|
|
Raspberry31416.com
|
Simple As Pi!
Pi (not pie) is the name of a mathematical constant that represents the ratio of a circle's diameter to its circumference. Pi is an irrational number that cannot be represented exactly as a fraction.
With the super-computing power available as of 2015, Pi has been calculated to 13 trillion digits. But for most purposes, using an approximation of 3.14 or 3.1416 is sufficient. My junior high math teacher required us to use 3.1416.
So . . . pi.gnance is an approximation of Raspberry Pi!
March 14 is Pi Day!
Each year features Pi Day on March 14, or 3/14. During 2016 a special Pi day with two additional digits of precision occurred on 3/14/16. And during 1593, the Pi Day to end all Pi Days featured a total of 7 digits of precision, 3/14/1593. It will be almost 14,000 years on 3/14/15927 before a date with 8 digits of pi will roll around (assuming of course that humanity survives the Y10K bug)!
Cook Your Own Pi
Want to use your Raspberry Pi to approximate the value of pi? Here is a short recipe written in C by Dik Winter that will calculate pi to 800 digits! (Note that 10 decimal digits for Pi, 3.1415926536 is sufficient to calculate the diameter of the earth with a margin of error of less than one foot.)
To use this program:
- Save the following three lines of C code to a file named calcpi.c on your Raspberry Pi
int a=10000,b,c=2800,d,e,f[2801],g;main(){for(;b-c;)f[b++]=a/5;
for(;d=0,g=c*2;c-=14,printf("%.4d",e+d/a),e=d%a)for(b=c;d+=f[b]*a,
f[b]=d%--g,d/=g--,--b;d*=b);}
- Open a terminal session, and from the directory where calcpi.c exists run the following command to generate an executable program called calcpi
gcc calcpi.c -o calcpi
- From the same directory, run this command:
./calcpi
Your Raspberry Pi 3 will execute the program in a fraction of a second and display the following output:
Pi> ./calcpi
314159265358979323846264338327950288419716939937510582097494
459230781640628620899862803482534211706798214808651328230664
709384460955058223172535940812848111745028410270193852110555
964462294895493038196442881097566593344612847564823378678316
527120190914564856692346034861045432664821339360726024914127
372458700660631558817488152092096282925409171536436789259036
001133053054882046652138414695194151160943305727036575959195
309218611738193261179310511854807446237996274956735188575272
489122793818301194912983367336244065664308602139494639522473
719070217986094370277053921717629317675238467481846766940513
200056812714526356082778577134275778960917363717872146844090
122495343014654958537105079227968925892354201995611212902196
086403441815981362977477130996051870721134999999837297804995
10597317328160963185
Most of you have probably already noticed that the number 42 (the widely accepted answer to life, the universe, and everything) appears 4 times in the first 800 digits of pi. It has long been suspected that the actual question to go with the answer 42 is encoded somewhere in the first 3 trillion digits of Pi, but as of yet nobody has been able to decode it.
Raspberry Pi Wallpaper - Don't Panic
The Raspberry Pi Foundataion has a really cool logo. It's very simple and very recognizable, and it's also very proprietary.
Their logo appears on the desktop of the Raspbian distribution, but their
usage policy
makes it clear that it won't be appearing on pi.gnance.com.
For a little variety, you might want to consider a desktop wallpaper from pi.gnance.com.
Our wallpapers not only feature the time-tested pi symbol, they also include the words DON'T PANIC in large friendly raspberry-red letters.
All materials on pi.gnance.com are ©2017-2024 Gary Nance
unless otherwise noted. All rights reserved.
|
|
|
|
|
|