[Numpy-discussion] OS X PPC problem with Numpy 1.3.0b1

Charles R Harris charlesr.harris at gmail.com
Mon Mar 23 20:14:26 EDT 2009


On Mon, Mar 23, 2009 at 6:06 PM, Pauli Virtanen <pav at iki.fi> wrote:

> Mon, 23 Mar 2009 16:52:28 -0600, Charles R Harris wrote:
> [clip]
> >> >  >>> y=np.longdouble(2)
> >> >  >>> y
> >> > 2.0
> >> >  >>> y**1
> >> > 2.0
> >> >  >>> y**2
> >> > crash
> >>
> >> Ok, this looks a bit tricky, I have no idea what's going on. Why does
> >> it not crash with the exponent 1...
> >
> > I'd guess because nothing happens, the function simply returns.
>
> Which function? The code path in question appears to be through
> @name at _power at scalarmathmodule.c.src:755, and from there it directly
> seems to go to _basic_longdouble_pow, where it calls npy_pow, which calls
> system's powl. (Like so on my system, verified with gdb.)
>
> I don't see branches testing for exponent 1, so this probably means that
> the crash occurs inside powl?
>

Yes, I think so. But powl itself might special case for some exponent values
and follow different paths accordingly. The float128 looks like mingw and,
since 64 bit support is still in development, what we might be seeing is a
bug in either mingw or its linking with MS. I don't know if mingw uses its
own library for extended precision, but I'm pretty sure MS doesn't support
it yet.

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


More information about the NumPy-Discussion mailing list