IEEE special values

N

Norbert Nemec

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.)

Ciao,
Nobbi
 
J

John Roth

Norbert Nemec said:
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
 
T

Terry Reedy

is there any simple reason why IEEE special values are so poorly supported
in python?

A. They are poorly, and just as importantly, inconsistently supported
in C.
B. Python's floating point arithmetic and standard functions are thin
wrappers of the C layer.

TJR
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top