guile-devel
[Top][All Lists]
Advanced

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

Re: IEEE Inf and NaN support for numbers.c


From: Marius Vollmer
Subject: Re: IEEE Inf and NaN support for numbers.c
Date: 14 Mar 2002 21:59:17 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

"John W. Eaton" <address@hidden> writes:

> The following patch adds basic IEEE Inf and NaN support for guile.  This
> introduces two new predicates (inf? and nan?) and two new functions
> (inf and nan, which return IEEE Infinity and NaN values,
> respectively).

Nice, thanks.

>   guile> (/ 0)
>   Inf

This is not a good print syntax for the new "inf" value.  It looks
like a symbol, while it really is a number.  Likewise for "NaN".

What about using "1/0" for inf and "0/0" for NaN.  Does this fit with
the IEEE rules?

When this works, we don't need the 'inf' and 'nan' procedures.

Do we want to care about signalling versus quiet NaNs, and the extra
information in the mantissa of NaNs?  (I don't think so.)

Also, somewhat unrelated to your patch, Guile can not read the
(illegal) notation "#.#" that is produces for funny numbers.  It's
probably best to avoid outputting this notation altogether and just
find a way to cope with funny numbers more sanely.  (Like you just did
for infinity.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]