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

From: Alan Watson <alan>
Date: Sat, 30 Jun 2007 19:05:00 -0500

Aubrey Jaffer wrote:
> SCM's addition routine codes no tests for NaNs. Neither do any of
> SCM's other arithmetic operations. Because NaNs in flonums are
> contagious, checks for NaNs can be delayed until it is convenient for
> the implementation. In SCM's case, this is in the routine which boxes
> inexact numbers.
>
> [...]
>
> Skipping the check for NaN and infinities improved the CPU-time (the
> "User" line in the data) less than 2%, while CPU-time variations were
> around 1%. The raw readings are appended.

SCM is not a fast implementation of Scheme. Therefore, that something
provokes a 2% change in the run-time of a program in SCM does not imply
that it will provoke similarly small changes in other implementations.

Regards,

Alan
Received on Sat Jun 30 2007 - 20:05:00 UTC

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