[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Date: Fri, 22 Jan 88 22:15:21 PST
From: Jon L White <edsel!jonl@labrea.Stanford.EDU>
Does anyone care what values these "constants" actually take on? that is,
does anyone use then in any context other than test suites?
CLtL p231 says that this number should be the "number closest in value to
(but not equal to) zero provided by the implementation." In those
implementations supporting IEEE-like denormalized numbers, a question
arises: are denormalized numbers "provided", in the sense required?
Of the four such implementations I've checked, half set this constant
to the least normalized number, and half set it to the least denormalized
In Symbolics Genera 7.2, we've made the values of those constants be
denormalized to meet the letter of CLtL (they used to be normalized).
We also added some constants to the SCL: (Symbolics-Common-Lisp:)
package, like LEAST-POSITIVE-NORMALIZED-<mumble>-FLOAT.
Supporting the former is the fact that IEEE hardware, when traps are
enabled, will signal an underflow trap whenever a result would be less
than the least normalized number. Supporting the latter is the fact
that under at least mode of operation of the hardware, denormalized
numbers are "provided" by the implementation.
It's a little more complicated (as if we needed that :-). IEEE
underflow traps don't happen for addition or subtraction, just for
multiplication and division. So whether you see denormalized results
from normalized operands (without traps) depends on the operation.
[Note that any addition or subtraction which produces a denormalized
result is exact. That's not always true for multiplication or
Oh, yeah. In answer to your original question, we don't care or use
them for anything. But a customer complained, so we changed to conform
to the letter of CLtL.
-- JonL --