[r6rs-discuss] Validity of nan.0 and inf.0 using a radix other than 10.
William D Clinger
will at ccs.neu.edu
Thu Jul 17 09:13:00 EDT 2008
> Should the following be valid:
> According to the spec it is.
I don't know whether they *should* be valid, but they
*are* valid according to both the R6RS and ERR5RS.
They are not valid according to the R5RS, but
implementations of the R5RS are permitted to extend
the R5RS lexical syntax so as to accept them.
> The question being raised is whether the
> 'decimal point' in nan's and inf's should be treated as a normal decimal
> point, making them implicitly a decimal.
I do not understand what you might mean by "a decimal".
So far as I know, that phrase is not a term of art in
either the R5RS or the R6RS.
> Also, nan's and inf's are inexact by nature, there are also no way to create
> any other forms of inexact numbers using a radix other than 10 (according to
> the spec).
That is untrue. For example, #i#xf/c is inexact.
> "If the representation of a number object has no exactness prefix, the
> constant is inexact if it contains a decimal point, an exponent, or a
> nonempty mantissa width; otherwise it is exact."
> The above either implies nan's and inf's are exact OR the 'decimal point' in
> them are infact seen as a real decimal point allowing them to be inexact.
> This is ambiguous.
I don't see how it is ambiguous, because I don't see
how you can read that sentence to mean that #x+inf.0
and #b+nan.0 are exact. Neither has an exactness
prefix, so they are inexact if they contain a decimal
point. Which they do. Therefore they are inexact.
More information about the r6rs-discuss