Re: Pi


[Prev][Next][Index][Thread]

Re: Pi



There is another way to find PI, and it can be implemented in TI Basic,
(Or any other language).  I do it on computers that don't spit at me
after the 8th decimal place... scientific notation really bugs me. :-)
Anyway, using a loop, this is PI:

PI=4(1-1/3+1/5-1/7+1/9-1/11...)
If you represent the fractions as 1/a and keep adding two to a, you can
keep a running total.
There are workarounds on 386 and 486 processors using QuickBasic that
allow you to calculate to 127 (or so) decimal places.  If you run the
program and leave the computer for the appropriate numbers of
minutes/hours, you'll comeback to the right value, if you double check
it.
BTW, I have Carl Sagan and his book 'Contact' to thank for this...
although I can't find the ones and zeroes in his later chapters. :-)


Bart Haagdorens wrote:
>
> Rhombus wrote:
>
> > One simple explanation is :
> >
> > PI is the circumference of a circle divided by its diameter.
> > But the circumference cannot be measured or calculated exactly.
> > Mathematicians get an approximation of this circumference, and hence of PI,
> > by calculating the circumference of a regular polygone with, say 1000
sides.
> > This can be done exactly with a little trigonometry.
>
> There is another way, using the Talor Polynominal of atan(1). Theoretically,
> atan(1)=pi/4, so if you could get a good approximation of atan(1), and then
> multiply it by 4, you'd also find pi.
> With the Taylor Polynominal of atan(x)=x - x^3/3 + x^5/5 -x^7/7 + x^9/9 + ...
> you could calculate pi/4 as accurate as you'd want, simply by taking some
more
> terms into the sum.
>
> People who own a TI-92, can easily calculate pi theirselves (I don't know
wether
> it's possible with other TI's, it depends on wether they can calculate the
> Taylor-polynominal. You could ofcourse enter the polynominal by hand...)
>
> First you calculate the Taylor polynominal upto let's say the 21st grade.
>
>     taylor(tan-1(x),x,21)
>
> Then you calculate it for x=1 (using WITH for example). You multiply it by 4,
> and there's your own approximation of pi!
>
>    (in this case, it would be 11757173 / 14549535 * 4 = 3.23232)
>
> That's not very close, but the approximation becomes better by taking more
and
> more terms...
>
>   (up to the 49th term, the result would be 3.18158, that's a little better)
>
> Perhaps this is not the easiest way to calculate pi, but it's certainly a
> reliable one!
>
> Within Taylor's theory, it's even possible to calculate how big the deviation
in
> your result versus the exact value can be, but that's something for your
math's
> teacher!

--
Colin Guillas       Ringmaster For Commodore Ring
http://cbmring.home.ml.org  ringmaster@ottawa.com
Kinetix Web Design     http://kinetix.home.ml.org
High Quality, Low Priced Web Design For Everyone!


Follow-Ups: References: