[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

RE: Re: [FWP] algorithm to calculate pi



But if you read the C program.. the precision is the whole point
here. I tried to play with Math::BigFloat.. seems can't
come up with something easy..

>Michael Assels wrote:
>> 
>> I can't promise 280 digits, but here's something shorter:
>> 
>> #!/usr/bin/perl -l
>> for(0..9999){$i=$_*8;$p+=(16**-$_)*(4/($i+1)-2/($i+4)-1/($i+5)-1/($i+6))}print$p
>
>Well, if precision doesn't count then there's always
>
>    print 4*atan2 1,1;
>
>-- 
>Rick Delaney
>rick.delaney@home.com
>
>==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
>==== Send email to <fwp-request@technofile.org> with message _body_
>====   unsubscribe




------------------------------------------------------------
Email account furnished courtesy of AntiOnline - http://www.AntiOnline.com
AntiOnline - The Internet's Information Security Super Center!


******************************************************
Make FREE long distance phone calls online!	
Click here to use PhoneFREE.com today!
http://adserv.internetfuel.com/cgi-bin/newredirect.cgi?AD=EMAIL-phonefree
******************************************************

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe