[Numpy-discussion] Bug in logaddexp2.reduce

Charles R Harris charlesr.harris@gmail....
Wed Mar 31 17:36:12 CDT 2010


On Wed, Mar 31, 2010 at 4:15 PM, T J <tjhnson@gmail.com> wrote:

> On Wed, Mar 31, 2010 at 1:21 PM, Charles R Harris
> <charlesr.harris@gmail.com> wrote:
> >
> > Looks like roundoff error.
> >
>
> So this is "expected" behavior?
>
> In [1]: np.logaddexp2(-1.5849625007211563, -53.584962500721154)
> Out[1]: -1.5849625007211561
>
> In [2]: np.logaddexp2(-0.5849625007211563, -53.584962500721154)
> Out[2]: nan
>
> In [3]: np.log2(np.exp2(-0.5849625007211563) +
> np.exp2(-53.584962500721154))
> Out[3]: -0.58496250072115608
>
>
I don't see that

In [1]: np.logaddexp2(-0.5849625007211563, -53.584962500721154)
Out[1]: -0.58496250072115619

In [2]: np.logaddexp2(-1.5849625007211563, -53.584962500721154)
Out[2]: -1.5849625007211561

What system are you running on.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100331/edd97b14/attachment.html 


More information about the NumPy-Discussion mailing list