chibi-scheme/lib/scheme/inexact.scm

6 lines
144 B
Scheme

(define (finite? x)
(and (real? x) (not (nan? x)) (not (= x +inf.0)) (not (= x -inf.0))))
(define (nan? x)
(and (real? x) (not (= x x))))