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.
This commit is contained in:
parent
ff5568389c
commit
85b32d43e6
2 changed files with 5 additions and 2 deletions
|
|
@ -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))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue