[r6rs-discuss] Validity of nan.0 and inf.0 using a radix other than 10.
xacc.ide at gmail.com
Thu Jul 17 16:32:25 EDT 2008
Thanks for the clarification, I however am still unsure which route to
> I agree that #e+inf.0 should be an error, and I
> believe that it *is* an error in approximately the
> R5RS sense, which is to say it has unspecified
> behavior with respect to the R6RS: Implementations
> of the R6RS are not required to raise an exception
> when they encounter #e+inf.0 as a lexical token,
> because it is clearly generated by the lexical
> syntax and there is no clarifying prose to suggest
> that it is illegal or should raise an exception;
> at the same time, implementations should be allowed
> to raise an exception because #e+inf.0 makes no sense.
So as the behavoir is unspecified, this leads to a paradox!
- read number (say #e+inf.0)
- if you allow inf.0, then no error, but the number is not exact (and cannot
possibly be exact), and applying exact to inf.0 yields an exception.
- if you do not allow inf.0, then you raise an exception, and the input is
So either way, it does not make sense.
More information about the r6rs-discuss