[BioPython] Windows Install Question
Andrew Dalke
Andrew Dalke" <dalke@dalkescientific.com
Tue, 23 Oct 2001 23:02:55 -0600
Andreas Matern:
>The only failure that the setup.py test package gave me was
>Failure:test_SubsMat
>
>interestingly, the Assertion Error is:
>
>Output : 'M 0.00 0.40 0.70 0.80 1.00\n'
>Expected: 'M -0.00 0.40 0.70 0.80 1.00\n'
>
>Wonder why the - sign?
IEEE 754 floating point and its support (or lack of support)
in various math libraries.
On the open-bio machine (a DEC, err, Compaq, err, Gateway)
>>> 0.0
0.0
>>> 0.0 * -1
-0.0
>>> 0.0 == (0.0 * -1)
1
>>> import struct
>>> struct.pack("f", 0.0)
'\000\000\000\000'
>>> struct.pack("f", 0.0 * -1)
'\000\000\000\200'
>>>
On IRIX
>>> 0.0
0.0
>>> 0.0 * -1
0.0
>>>
This is why text comparisons of floating point numbers is
not the right solution. I apologize for proposing it :)
Andrew
dalke@dalkescientific.com