diff options
author | Mark H Weaver <mhw@netris.org> | 2013-07-16 03:42:52 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2013-07-16 03:59:14 -0400 |
commit | 85b32d43e63bd2939ce3706f44a50f153ba01a46 (patch) | |
tree | ca4b8a06b4d348a35789b710bb18edd38d7d6638 /module/rnrs/arithmetic | |
parent | ff5568389c037f7c7b5dff9505c69e7f586f95aa (diff) | |
download | guile-85b32d43e63bd2939ce3706f44a50f153ba01a46.tar.gz |
flfinite? applied to a NaN returns false.
Fixes <http://bugs.gnu.org/14868>.
Reported by Göran Weinholt <goran@weinholt.se>.
* module/rnrs/arithmetic/flonums.scm (flfinite?): If the argument is a
NaN, return false.
* test-suite/tests/r6rs-arithmetic-flonums.test (flfinite?): Add test.
Diffstat (limited to 'module/rnrs/arithmetic')
-rw-r--r-- | module/rnrs/arithmetic/flonums.scm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/rnrs/arithmetic/flonums.scm b/module/rnrs/arithmetic/flonums.scm index 60d6cf6e2..be59295a7 100644 --- a/module/rnrs/arithmetic/flonums.scm +++ b/module/rnrs/arithmetic/flonums.scm @@ -89,7 +89,7 @@ (define (flnegative? fl) (assert-flonum fl) (negative? fl)) (define (flodd? ifl) (assert-iflonum ifl) (odd? ifl)) (define (fleven? ifl) (assert-iflonum ifl) (even? ifl)) - (define (flfinite? fl) (assert-flonum fl) (not (inf? fl))) + (define (flfinite? fl) (assert-flonum fl) (not (or (inf? fl) (nan? fl)))) (define (flinfinite? fl) (assert-flonum fl) (inf? fl)) (define (flnan? fl) (assert-flonum fl) (nan? fl)) |