IEEE special values

John Roth newsgroups at jhrothjr.com
Sat Aug 16 11:11:07 EDT 2003


"Norbert Nemec" <nobbi_at_theorie3.physik.uni-erlangen.de at NOSPAM.COM> wrote
in message news:bhl7bi$ggg$1 at rznews2.rrze.uni-erlangen.de...
> Hi there,
>
> is there any simple reason why IEEE special values are so poorly supported
> in python? Are there any serious efforts to change that? NaN and Inf are
an
> extremely useful concept for numerical calculations and they would mix
> perfectly with the concepts in NumPy, anyhow, the support seems to be
> absolutely minimal.
>
> (The ideas in PEP 754 do not really change much: There is little use in
easy
> access to those values, if the math functions don't accept them as input
> but break down.)

Like a lot of things, Python's math functions are a rather thin layer
on top of the native C library's math functions. If the C library's
math functions, to use the vernacular, suck, then Python's math
functions will do likewise.

One of the essential problems is that every library does certain
things differently, like deciding whether it's going to start up with
silent or signaling NaN's, or what the actual string values are for
NaN, infinity and so forth.

It takes developer time to clean up that situation. I suspect
that volunteers would be very welcome.

John Roth

>
> Ciao,
> Nobbi






More information about the Python-list mailing list