In article <[EMAIL PROTECTED]>,
 Christian Heimes <[EMAIL PROTECTED]> wrote:

> Grant Edwards wrote:
> > In many applications (e.g. process control) propogating NaN
> > values are way too useful to avoid.  Avoiding NaN would make a
> > lot of code far more complicated than would using them.
> 
> NaNs are very useful for experienced power users but they are very
> confusing for newbies or developers without a numerical background.
> 
> It's very easy to create an inf or nan in Python:
> 
> inf = 1E+5000
> ninf = -inf
> nan = inf * 0.
> 
> 1E5000 creates a nan because it is *much* bigger than DBL_MAX (around
> 1E+308). In fact it is even larger than LDBL_MAX (around 1E+4932).

Isn't it safer to use float("inf"), float("-inf") and float("nan") to 
create the necessary items?

-- Russell
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to