[Numpy-discussion] OS X PPC problem with Numpy 1.3.0b1
Pauli Virtanen
pav at iki.fi
Mon Mar 23 20:06:51 EDT 2009
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?
--
Pauli Virtanen
More information about the NumPy-Discussion
mailing list