[r6rs-discuss] put-datum, get-datum, equal?, eqv?, and NaNs

From: Alan Watson <alan>
Date: Sat, 30 Jun 2007 18:48:30 -0500

William D Clinger wrote:
> If x is an external representation of an inexact
> real number object that contains no vertical bar,
> then its numerical value should be computed as
> though it had a mantissa width of 53 or more.

I think you want to say "binary mantissa with a width of 53 or more".

Now lets consider some problem cases:

(a) I have a Scheme that uses decimal floating-point numbers. I can only
write 1.1 exactly if I interpret "or more" to mean "infinity". I think
that's okay.

(b) If I have a Scheme that provides IEEE single, double, and
double-extended precisions using s, d, and l exponents. The 1.1d0 and
1.1l0 are okay, as I can treat them as 1.1d0|53 and 1.1l0|64. However,
1.1s0 no longer means what I think it does; I have to write it as
1.1s0|24. And if I want to write a subnormal single-precision value, I
have to explicitly give for the number of bits of mantissa to avoid
having it promoted to a double-precision value.

Will someone please explain: (a) what problem |p is solving and (b) what
problem the implicit mantissa width on unadorned inexact reals is solving.

Regards,

Alan
Received on Sat Jun 30 2007 - 19:48:30 UTC

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