[SciPy-user] Can SciPy compute ln(640320**3 + 744)/163**.5 to 30 places?

Tommy Grav tgrav at mac.com
Sat Jan 13 14:02:42 CST 2007


Actually if you use floats instead of int is the expression you get

 >>> print '%1.32f' % (log(640320.**3. + 744.)/163.**.5)
3.14159265358979311599796346854419
 >>> print '%1.32f' % (pi)
3.14159265358979311599796346854419
 >>>

Cheers
   Tommy


On Jan 13, 2007, at 1:59 PM, Dick Moores wrote:

> On 1/13/07, Darren Dale <dd55 at cornell.edu> wrote:
>> On Saturday 13 January 2007 9:39 am, Dick Moores wrote:
>>> Can python compute ln(640320**3 + 744)/163**.5 to 30 places?
>>
>> It looks like it is good to about 16 digits:
>>
>>>>> '%1.32f'%(log(640320**3 + 744)/163**.5)
>> '3.14159265358979311599796346854419'
>>
>> '3.14159265358979323846264338327950'
>> 1.234567890123456^
>
> Is that SciPy at work? If so, it's no better than plain old Python:
>
>>>> from math import log as ln
>>>> ln(640320**3 + 744)/163**.5
> 3.1415926535897931
>
> But thanks,
>
> Dick
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user



More information about the SciPy-user mailing list