[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: arithmetic issues

This page is part of the web mail archives of SRFI 77 from before July 7th, 2015. The new archives for SRFI 77 contain all messages, not just those from before July 7th, 2015.

 | From: Thomas Bushnell BSG <tb@xxxxxxxxxx>
 | Date: Sun, 23 Oct 2005 12:39:43 -0700
 | Aubrey Jaffer <agj@xxxxxxxxxxxx> writes:
 | > When different NaNs are returned depending on the circumstances
 | > creating them, I would like my implementation to display them
 | > like this:
 | >
 | >   #<not-a-number expt>
 | Sure, that seems fine.  We could mandate that as the readable written
 | representation!

It should *not* be a readable representation.  That serves only to
mask mathematical errors in saved datasets.  As Bakul Shah wrote:
"... IEEE754 says NaN is the result of an *invalid* operation, when an
operation's operands lie outside its domain."

And literal NaNs will find precious little use in programs if all
equality predicates return #f for them!