[Numpy-discussion] [Announce] Numpy 1.3.0b1

Charles R Harris charlesr.harris at gmail.com
Thu Mar 19 15:46:53 EDT 2009


On Thu, Mar 19, 2009 at 1:01 PM, Charles R Harris <charlesr.harris at gmail.com
> wrote:

>
>
> 2009/3/19 Robert Pyle <rpyle at post.harvard.edu>
>
>>
>> On Mar 19, 2009, at 1:38 PM, Pauli Virtanen wrote:
>>
>> Thanks for tracking this! Can you check what your platform gives for:
>>
>> > import numpy as np
>> > info = np.finfo(np.longcomplex)
>> > print "eps:", info.eps, info.eps.dtype
>> > print "tiny:", info.tiny, info.tiny.dtype
>> > print "log10:", np.log10(info.tiny), np.log10(info.tiny/info.eps)
>>
>> eps: 1.3817869701e-76 float128
>> tiny: -1.08420217274e-19 float128
>> log10: nan nan
>>
>
> The log of a negative number is nan, so part of the problem is the value of
> tiny. The size of the values also look suspect to me. On my machine
>
> In [8]: finfo(longcomplex).eps
> Out[8]: 1.084202172485504434e-19
>
> In [9]: finfo(float128).tiny
> Out[9]: array(3.3621031431120935063e-4932, dtype=float128)
>
> So at a minimum eps and tiny are reversed.
>

I started to look at the code for this but my eyes rolled up in my head and
I passed out. It could use some improvements...

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20090319/4f716c91/attachment.html>


More information about the NumPy-Discussion mailing list