       # Re: how to compute pi by using continued fraction?

```Jing S Chen wrote:
>
> Hello:
>     I'm a student of City College of San Francisco. Right now, I have a
> project that I've been working on at least 4 days. Yet I still have no
> idea at all.
>     The purpose of the project is to compute pi by using continued
> fraction. Here is the formula.
>
> pi = 3 + ( 1 / ( 7 + ( 1 / ( 7 + ( 1 / ( .... 1 / 7)
>
> that means
>                      1
> pi = 3 + -----------
>                7 + /   1               \
>                     (   ------            )
>                      \   7 +            /
>                            .......
>                                    1
>                              +   ----
>                                     7
>
> Is here any one who has a program that can follow the above formula and
> can generate pi?
>
> Jing S. Chen
> e-mail: jchen06@hills.ccsf.cc.ca.us

Jing:

You are computing the continued fraction <3,7,7,7,...> which is NOT
equal to Pi.  If fact any cf that is periodic like has the form a + b
Sqrt[c].  The continued fraction representation of pi is <3,7,15,1...>
and has no pattern.  The NumberTheory`ContinuedFraction.m package will
compute the representation to many terms.

Ken Levasseur
UMass Lowell

```

• Prev by Date: RE: List as variable
• Next by Date: Re: Re: Inserted Objects wont Print!!
• Prev by thread: how to compute pi by using continued fraction?
• Next by thread: Re: how to compute pi by using continued fraction?