Re: arithmetic issues Marcin 'Qrczak' Kowalczyk 24 Oct 2005 02:27 UTC

Taylor Campbell <xxxxxx@mumble.net> writes:

> But NaN conditions can be signalled like error conditions can be;

When the INVALID exception is signalled, there is nothing to print.
The issue of printing and reading NaNs arises only when the exception
is not signalled and the operation yields a NaN instead, which is the
default in IEEE.

> this is typically what is done with exact arithmetic, such as in
> Scheme48:
>
> (/ 0 0)     => Error: rational division by zero

Of course; because in the case of exact arithmetic the problem
definitely means that the function is undefined at this point.
With inexact arithmetic it might just result from rounding errors,
so a computation can't expect it in advance, thus it's not generally
a symptom of a bug.

--
   __("<         Marcin Kowalczyk
   \__/       xxxxxx@knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/