Re: Print value of p from the infinite series
- From: Lew <lew@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 27 Feb 2007 17:09:32 -0500
Lew wrote:
Lew wrote:while ( (p - Math.PI) < 1E-6 )
or
for ( int i = 1; (p - Math.PI) < 1E-6; i += 2 )
Use your own values for the target and epsilon.
Exuse me, that condition should be inverted
while ( (p - Math.PI) > 1E-6 )
And the absolute value taken.
- Lew with an abashed grin
.
- References:
- Print value of p from the infinite series
- From: Lea0x . Diz
- Re: Print value of p from the infinite series
- From: Lew
- Re: Print value of p from the infinite series
- From: Leah
- Re: Print value of p from the infinite series
- From: Lew
- Re: Print value of p from the infinite series
- From: Lew
- Print value of p from the infinite series
- Prev by Date: Re: Java Applet Notinited
- Next by Date: Dynamic execution of a string as a java statement
- Previous by thread: Re: Print value of p from the infinite series
- Next by thread: Re: Print value of p from the infinite series
- Index(es):