[r6rs-discuss] [Formal] < is inconsistent on NaNs.

From: Aubrey Jaffer <agj>
Date: Sat Jan 20 07:08:31 2007

---
This message is a formal comment which was submitted to formal-comment_at_r6rs.org, following the requirements described at: http://www.r6rs.org/process.html
---
	         submitter's name: Aubrey Jaffer
	submitter's email address: agj_at_alum.mit.edu
		    type of issue: Defect
		         priority: Major
		   R6RS component: Arithmetic
	    version of the report: 5.92
one-sentence summary of the issue: < is inconsistent on NaNs.
    full description of the issue:
Page 42: 9.9.4 Numeric Operations gives < as a procedure of one or
more real arguments:
  (< x1 x2 x3 . . . ) procedure
But later in the description states:
  For any number z:
  (= +nan.0 z) ==> #f
  (< +nan.0 z) ==> #f
This implies that, while (< 0 1+i) should signal an exception,
(< +nan.0 1+1i) should return #f.  If 1+i is an illegal argument to <
sometimes, then it should always be an illegal argument to <.
The behavior of (< +nan.0) [and (= +nan.0)] should be specified.  Is
the sequence of just +nan.0 "monotonically increasing"?  If so, then
(< +nan.0) should return #t.  This would seem to be inconsistent with
+nan.0 forcing the example (< +nan.0 z) to return #f.
Having only one NaN inequality example [<] leaves the behavior of >,
<=, and >= on NaNs open to question, as well as the behavior when NaN
is other than the first argument.
Received on Fri Jan 19 2007 - 22:29:09 UTC

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