[r6rs-discuss] [Formal] Formal Comment: NaN should be considered a number, not a real
Arthur Smyles
atsmyles at rcn.com
Tue Jun 19 00:47:13 EDT 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
---
NaN should be considered a number, not a real
Submitter: Arthur Smyles
Email: atsmyles at rcn.com
Type of issue: Defect
Priority: Major
Component: arithmetic
version: 5.94
According to Section 2.4 Infinities and NaNs?
"A NaN is regarded as a real (but not rational) number whose value is so
indeterminate that it might represent any real number, including
positive or negative infinity, and might even be greater than positive
infinity or less than negative infinity."
In formal comment 11, Aubrey Jaffer correctly stated that NaN is not a
real number. But, his conclusion that a NaN is a complex number is also
incorrect. The complex numbers includes the set of all real and
imaginary numbers. NaN is neither real nor imaginary, therefore it
cannot be a value in the real or the imaginary part of a complex number,
therefore it cannot be complex. So the definition of a number is really
the set of all complex numbers and NaN.
If you treat a NaN as a number that is not complex, it will solve the
performance issues stated in formal comment 143. It will also address
formal comment 230, which will make reals conform to mathematical usage.
It will also conform with IEEE-754.
In conclusion this section should read:
A NaN is regarded as a number that is not complex.
More information about the r6rs-discuss
mailing list