Happy Pi Day!
BlueCalx- writes "Today (March 14, 3-14-00) is Pi Day. ticalc.org has a feature on calculating pi and its origins. A search engine exists to search for a string of numbers in the first ten million digits of pi. And of course, there is the first million digits of pi. Eat pie, memorize pi, and watch Pi. I've got my day planned! "
private char nth_pi (int n) {' C','D','E','F'};
/* sum_k 16^(n-k)/(8*k+m) */
/* expm = 16^p mod ak. */
// Bailey-Borwein-Plouffe Algorithm for arbitrary digit calculations.
// only valid upto 2 ^ 24 for java IEEE precision.
int loop; String Schx = "";
double piFraction, s1, s2, s3, s4;
char[] chx = new char[16]; int i,nhx; double y,x;
char[] hx = {'0','1','2','3','4','5','6','7','8','9','A','B',
s1 = series (1, n);s2 = series (4, n);s3 = series (5, n);
s4 = series (6, n); piFraction = 4. * s1 - 2. * s2 - s3 - s4;
piFraction = piFraction - (int) piFraction + 1.;x=piFraction;nhx=16; y = Math.abs(x);
for (i = 0; i < 16; i++){
y = 16. * (y - Math.floor (y));
chx[(int)i] = hx[(int)Math.abs(y)];
} for (loop=0;loop<16;loop++)
Schx = Schx + chx[loop];
return chx[0]; }
private double series (int m, int n)
{ int k; double ak, eps, p, s, t; eps = 0.00000000000000001;
s = 0.;
for (k = 0; k < n; k++){
ak = 8 * k + m; p = n - k;
t = expm (p, ak); s = s + t / ak;
s = s - (int) s;}
for (k = n; k <= n + 100; k++){
ak = 8 * k + m;
t = Math.pow (16., (double) (n - k)) / ak;
if (t < eps) break;
s = s + t; s = s - (int) s;
} return s; }
private double expm (double p, double ak)
{ int i; int j; double p1, pt, r;
if (tp1 == 0) {
tp1 = 1; tp[0] = 1.;
for (i = 1; i < 25; i++) {tp[i] = 2. * tp[i-1];}} if (ak == 1.) return 0.;
for (i = 0; i < 25; i++) if (tp[i] > p) break;
pt = tp[i-1];
p1 = p;
r = 1.;
for (j = 1; j <= i; j++){
if (p1 >= pt){ r = 16. * r; r = r - (int) (r / ak) * ak;
p1 = p1 - pt; } pt = 0.5 * pt;
if (pt >= 1.){ r = r * r;
r = r - (int) (r / ak) * ak; } }
return r; }
and the following are global :
static int tp1 = 0;
static double[] tp = new double[25];
And here is an HTTP link: http://wuarchive.wustl .edu/doc/gutenberg/etext93/pimil10.txt
So there we were in Topology class. The class was being taught by the "Super Texas" method, which means we are given a few premises, and we work up an entire field of mathematics through proof. Each student had to prove things on the board in front of the other students. I said "OK let's take an irrational number...umm...Pi.." when suddenly, from the back of the class came "how do you know that Pi is irratoinal?" I spent the rest of the class proving it (off the top of my head, with much help from the professor). Needless to say, from then on, we used 1.01001000100001... or 2^.5 as our favorite irrational numbers.
Thank you for not thinking.
In 1897, the state of Indiana nearly passed a bill decreeing that Pi is equal to 3.2 (it also said that sqrt(2) = 10/7). The bill unanimously passed the state House of Representatives (on a vote of 67-0), and went from there to the Senate. First it was referred to the Committee on Temperance, apparently as a joke, and the committee recommended approval. Then there was a floor debate in the Senate, full of puns and ridicule, in which all of the Senators who spoke admitted their ignorance on the merits of the bill. Importantly, they didn't kill it because it was a mathematical falsehood, but because the Senators thought they shouldn't be writing a law about something like that.
:-)
There's a story about it on the urban legends site. Evidently, a crank mathematician named Dr. Edwin J. Goodwin M.D. "discovered" this new fact about Pi, and offered to let Indiana use it in their school textbooks without royalties if they passed the law. His state Representative bought into it and introduced the bill.
I wonder if Kansas has any plans these days concerning Pi?
Always keep a sapphire in your mind
Pi? Why, I remember many years ago when I first heard the Story of Pi. I was just a little sprig of a troll, sitting on my grandfather's knee in our cozy little cave beneath the bridge. Oh, those were the days, when goats were plenty, the nights were long and hardly ever did the Karma Whores sell their warez by the river bank. And then there was pi . . .
What?!?! You NEVER heard the Story of Pi? Well, sit down laddie! Grab yourself a fondue fork and I'll learn you REAL good.
It all happened many many many many many years ago. Before I was born. Way back in the days of my granddaddy's poppa's great-grandfather's aunt's father's mother's granddad. The world was full of wonders even beyond my senile waxing. It was around this time that the Darkly Darkly wood was Open Sourced to all, and the knights of Slash ran amok spreading their Perl of Wisdom.
There was one little troll, much like yourself, only not quite as stinky. He was named Bgialtels, and was the brother of my granddaddy's poppa's great-grandfather's aunt's father's mother's granddad. He was an angry little man, as most of us are, and wasn't happy with the Order of the Benevolent Single Druids, of which my granddaddy's poppa's great-grandfather's aunt's father's mother's granddad was a part. He thought that they must be distroyed, and so he came up with a plan.
Bgialtels summoned demons at the annual Faeries Unified Dinner to run amok over the desert tables. At first everyone ignored them, even my granddaddy's poppa's great-grandfather's aunt's father's mother's granddad, but soon it became a problem. Action needed to be taken. After fourteen hours of havoc, my granddaddy's poppa's great-grandfather's aunt's father's mother's granddad placed upon the table 3.1428571 cherry pies in a carefully calculated place which made the demons slip into the flaming cheese fondue. Screaming in agony, the demons lashed out, managing only to take the final "e" off the word, leaving us with Pi.
And that, my little friends, is where easter . . . I mean PI came from.
thankyoutheend
Shouldn't the declaration of Pi day wait until 3-14-15?
The interesting thing relating them would be:
Yep. That's just bizarre. Nonetheless pretty much irrefutable in the complex number system.
(anyone else notice how the sup tag doesn't work?)