William D Clinger
will at ccs.neu.edu
Wed Aug 30 12:16:19 EDT 2006
> In my interpretation, IEEE +0.0 is some tiny positive number, not zero,
> and IEEE -0.0 is some tiny negative number, not zero. If this were not
> the case, i.e., if +0.0 or -0.0 could be exactly zero, division by either
> of these quantities would have to produce NaN. With this interpretation,
> (/ 0 +0.0) and (/ 0 -0.0) should return 0, since 0 divided by some tiny
> non-zero quantity is 0. By the same rationale, (* 0 +nan.0) should also
> return 0.
The R6RS does not assume that inexact numbers are
represented in floating point, and certainly does
not assume they are represented in IEEE floating
More importantly, implementations are not supposed
to return an exact number for things like (/ 0 0.0)
unless they can prove that the result they want to
return is the correct result for all substitutions
of exact numbers for the inexact ones. That means
that an implementor who wants to return an exact 0
for (/ 0 0.0) is obliged to prove that 0 is the
correct result of, among other things, (/ 0 0).
Your argument above does not convince me that 0 is
the correct result of (/ 0 0). Therefore your
argument does not convince me that the R6RS should
allow (/ 0 0.0) to evaluate to an exact 0.
> I object.
More information about the R6RS