Comment 1 for bug 308940

Revision history for this message
Roman Marynchak (roman-marynchak) wrote :

Regarding the question from the bug description, (COERCE HUGE 'SINGLE-FLOAT) should not signal about the overflow. In COERCE description in CLHS, we can read the following:

"If the result-type is any of float, short-float, single-float, double-float, long-float, and the object is a real, then the result is a float of type result-type which is equal in sign and magnitude to the object to whatever degree of representational precision is permitted by that float representation."

This paragraph has nothing about the overflow errors.

Other implementations (CLISP, Clozure) signal the overflow, or return the single-float plus-infinity (Lispworks). I guess that it is right to return the single-float infinity with the correct sign, just because this is formally in accordance with CLHS. Signaling an error is likely to be too severe - it cannot be based on COERCE description in CLHS. Obviously, I can be wrong - this is just my own point of view regarding this problem.