[r6rs-discuss] [Formal] Formal Comment: NaN should be considered a number, not a real

From: John Cowan <cowan>
Date: Sat, 23 Jun 2007 00:01:44 -0400

Arthur Smyles scripsit:

> Second, +inf and -inf are not ranges they are points. They lay on both
> ends of the real numbers, they follow most of the properties of real
> numbers, and it is established in mathematics.

But that's not what +inf means in IEEE arithmetic. It means any
number larger than the largest representable number up to and including
(affine) positive infinity.

> No. Anytime you do any mathematical operation with a NaN, the result
> must be a NaN, according to IEEE. So it has to be checked anyway.

But the hardware does that.

> Besides, you would never create a complex number for nan.0+1i, you would
> convert it to nan.0 instead.

However, nan.0+1i is what you get when you do the following computation,
given that IEEE 64-bit floats are in use:

        (- (+ 1e308+1i 1e308+1i) (+ 1e308+0.5i 1e308+0.5i))

-- 
John Cowan  cowan at ccil.org  http://ccil.org/~cowan
And now here I was, in a country where a right to say how the country should
be governed was restricted to six persons in each thousand of its population.
For the nine hundred and ninety-four to express dissatisfaction with the
regnant system and propose to change it, would have made the whole six
shudder as one man, it would have been so disloyal, so dishonorable, such
putrid black treason.  --Mark Twain's Connecticut Yankee
Received on Sat Jun 23 2007 - 00:01:44 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC