numpy, overflow, inf, ieee, and rich comparison
Konrad Hinsen
hinsen at cnrs-orleans.fr
Thu Oct 12 05:19:47 EDT 2000
"Tim Peters" <tim_one at email.msn.com> writes:
> C89 was fatally fuzzy about almost all floating-point issues, so there's
> unfortunately little that Python does for you beyond passing on your libc's
> particular delusions. From the above, it appears that an underflowing exp
> on your platform sets errno to ERANGE, while it does not under Windows.
I had the same problem with AIX, and I solved it by patching Python in
a way similar to the one you describe, but ignoring errors *only* for
underflow. And I wonder why this isn't done in the standard Python
code. After all, what possible use can one make of a feature
(exception on underflow) that is platform dependent? You can't turn a
zero result into an exception, so the only doable platform-independent
behaviour is to ignore underflows.
Now-only-using-Linux'ly
Konrad.
--
-------------------------------------------------------------------------------
Konrad Hinsen | E-Mail: hinsen at cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24
Rue Charles Sadron | Fax: +33-2.38.63.15.17
45071 Orleans Cedex 2 | Deutsch/Esperanto/English/
France | Nederlands/Francais
-------------------------------------------------------------------------------
More information about the Python-list
mailing list