|
From: <br...@ph...> - 2006-08-30 17:16:39
|
Petr Mikulik wrote:
> It seems that Inf is handled, so why not NaN?
Because NaN is worse than Inf. Infinity doesn't have all the properties
of a number, but still some of them. In particular +Inf is larger than
any other number, -Inf is smaller than any other.
So Inf is generally just out-of-range. A NaN value, OTOH, is
completely undefined. It's not even equal to itself!
> #x y type
> 0.1 10 i
> 0.2 20 i
> 0.3 0.3 u
> 0.4 40 i
Arguably, there's a bug in this result. The Inf could have
have been stored and marked as "out of range" ('o' instead of 'u').
|