[r6rs-discuss] [Formal] Formal Comment: NaN should be considered a number, not a real

From: Arthur Smyles <atsmyles>
Date: Thu, 21 Jun 2007 23:02:45 -0400

Aubrey Jaffer wrote:
> | Date: Tue, 19 Jun 2007 00:47:13 -0400
> | From: Arthur Smyles <atsmyles at rcn.com>
> |
> | 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.
>
> The argument naming conventions have `z' for complex arguments. If
> NaN is not complex, then the `z' convention must be changed to be:
> complex number or NaN.

  NaN describes specific situations in math that are undefined, like
0/0. I think keeping the 'z' convention is fine for the purpose of
defining the class of numbers that the operation can apply to even
though in special cases you get an undefined result.

>
> A similar situation exists for +inf.0, -inf.0 and real numbers.
> Do you consider +inf.0 and -inf.0 to be real numbers?

Yes
See http://en.wikipedia.org/wiki/Extended_real_number_line

Here is another way to think of NaN. If you think of a number as an
abstract object obeying a set of mathematical axioms, then a NaN is a
number with the empty set of mathematical axioms.
>
> | 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.
>
> _______________________________________________
> r6rs-discuss mailing list
> r6rs-discuss at lists.r6rs.org
> http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
>
Received on Thu Jun 21 2007 - 23:02:45 UTC

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