NAN

Ken Koller ken.koller at kla-tencor.com
Thu Sep 2 18:51:19 EDT 1999


Is there a constant defined as NAN for floats?

I noticed that 1.0E500 returns the string '1.#INF' and -1.0E500 returns
'-1.#INF' I was just wondering if you could do something like:

f = math.NAN
f = math.INF
f = -math.INF

etc...

I realize that NAN is implementation dependent and that Python shouldn't
care about the IEEE type implementations.

Seems like it could be useful to have a constant defined for these.

Thanks,

Ken






More information about the Python-list mailing list