[Python-Dev] troubling math bug under IRIX 6.5

Flying Cougar Burnette tommy@ilm.com
Tue, 13 Feb 2001 09:59:32 -0800 (PST)


Hey Folks, 

One of these days I'll figure that SOurceForge stuff out so I can
submit a real bug report, but this one is freaky enough that I thought
I'd just send it right out...

from the latest CVS (as of 9:30am pacific) I run 'make test' and get:

...
PYTHONPATH= ./python -tt ./Lib/test/regrtest.py -l
make: *** [test] Bus error (core dumped)


a quick search around shows that just importing regrtest.py seg
faults, and further simply importing random.py seg faults (which
regrtest.py does).  it all boils down to this line in random.py

NV_MAGICCONST = 4 * _exp(-0.5)/_sqrt(2.0)


and the problem can be further reduced thusly:

>>> import math
>>> 4 * math.exp(-0.5)
Bus error (core dumped)


but it isn't the math.exp that's the problem, its multiplying the
result times 4!

(tommy@mace)/u0/tommy/pycvs/python/dist/src$ ./python
Python 2.1a2 (#2, Feb 13 2001, 09:49:17) [C] on irix6
Type "copyright", "credits" or "license" for more information.
>>> import math
>>> math.exp(1)
2.7182818284590451
>>> math.exp(2)
7.3890560989306504
>>> math.exp(-1)
0.36787944117144233
>>> math.exp(-.5)
0.60653065971263342
>>> math.exp(-0.5)
0.60653065971263342
>>> 4 * math.exp(-0.5)
Bus error (core dumped)


is it just me?  any guesses what might be the cause of this?