[R6RS] proposing ten procedures

William D Clinger will at ccs.neu.edu
Thu Jul 20 12:18:36 EDT 2006

Concerning the procedures I proposed for rounding to
single and to double precision, and to extracting
single and double precision floating point numbers
from bytes objects, Mike wrote:

> Would it also make sense to include auxiliary procedure to extract
> sign, exponent, and mantissa from the IEEE representation?  Something
> like that is certainly needed in a few places in the reference
> implementation?

I couldn't find any places in the reference implementation
that could make use of procedures that extract the sign,
exponent, or mantissa of an IEEE representation.  What the
reference implementation needs is the ability to extract
sign, numerators, and denominators from inexact reals,
which need not correspond to any IEEE representation.

For example, the representation of inexact reals may use
base 3, with obvious implications for interpretation of the
exponent and mantissa.  While few systems are likely to use
base 3, this gedanken example may reveal some of the hidden
assumptions we can't afford to make.


More information about the R6RS mailing list