guile-devel
[Top][All Lists]
Advanced

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

mpz_cmp_d and NaNs in = and <


From: Kevin Ryde
Subject: mpz_cmp_d and NaNs in = and <
Date: Tue, 06 May 2003 09:24:35 +1000
User-agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux)

A concrete proposal for NaNs in = and <.  As mentioned previously,
mpz_cmp_d doesn't accept them.

        * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.

        * tests/numbers.test (=, <): Add tests involving NaNs.

Are the comments correct about SCM_COMPLEXP numbers never having a
zero imaginary part?  I suspect this means the mpz_cmp_d's in the
complex/bignum cases are not reached.  In fact perhaps any comparison
(= complex non-complex) would be #f without any testing.

Attachment: numbers.c.nan.diff
Description: Text document

Attachment: numbers.test.nan.diff
Description: Text document


reply via email to

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