[SciPy-user] Precision error on Mac OS X (PPC)

Iain Day iain at day-online.org.uk.invalid
Thu Nov 16 14:33:28 CST 2006


Hi,

I've just found the numpy mailing list, so I'll post there, and see if 
any one can help.

Thanks,

Iain

Erin Sheldon wrote:
> Hi Iain -
> 
> So I ran this on my powerbook G4, 10.4.8:
> [~]|11> print numpy.finfo(numpy.float128).min,numpy.finfo(numpy.float128).max,numpy.finfo(numpy.float128).eps
> 9223372034707292160.0 -9223372034707292160.0 1.38178697010200053818e-76
> 
> Same answer you got but no errors reported.  But of
> course those answers are totally wrong.
> 
> Same thing on my AMD64 machine:
> In [6]: print numpy.finfo(numpy.float128).min,numpy.finfo(numpy.float128).max,
> numpy.finfo(numpy.float128).eps
> -1.18973149535723176502e+4932 1.18973149535723176502e+4932
> 1.08420217248550443401e-19
> 
> Looks better.  So there is a bug on OS X it seems.
> Erin
> 
> 
> On 11/14/06, Iain Day <iain at day-online.org.uk.invalid> wrote:
>> Hi,
>>
>> I apologise if this is the wrong list for this. I have been having some
>> precision issues with some code I've got. I've searched the list
>> archives and came across these tests. SciPy and numpy are installed from
>> Fink, and running on a 1.5GHz G4 with Mac os x 10.4.8.
>>
>>  >>> import numpy
>>  >>> import scipy
>>  >>> numpy.__version__
>> '1.0'
>>  >>> scipy.__version__
>> '0.5.1'
>>  >>> print numpy.finfo(numpy.float32).min
>> -3.40282346639e+38
>>  >>> print numpy.finfo(numpy.float32).min,
>> numpy.finfo(numpy.float32).max, numpy.finfo(numpy.float32).eps
>> -3.40282346639e+38 3.40282346639e+38 1.19209289551e-07
>>  >>> print numpy.finfo(numpy.float64).min,
>> numpy.finfo(numpy.float64).max, numpy.finfo(numpy.float64).eps
>> -1.79769313486e+308 1.79769313486e+308 2.22044604925e-16
>>  >>> print numpy.finfo(numpy.float128).min,
>> numpy.finfo(numpy.float128).max, numpy.finfo(numpy.float128).eps
>> Warning: overflow encountered in add
>> Warning: invalid value encountered in subtract
>> Warning: invalid value encountered in subtract
>> Warning: overflow encountered in add
>> Warning: invalid value encountered in subtract
>> Warning: invalid value encountered in subtract
>> 9223372034707292160.0 -9223372034707292160.0 1.38178697010200053818e-76
>>
>> Any thoughts?
>>
>> Iain
>>
>> _______________________________________________
>> 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