From: Taylor R Campbell Date: Fri, 16 Nov 2018 17:00:10 +0000 (+0000) Subject: Make flo:integer? answer true only for finite inputs. X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=29136cc5c1e31e8839d1424908ca561f34c52fab;p=mit-scheme.git Make flo:integer? answer true only for finite inputs. --- diff --git a/src/runtime/arith.scm b/src/runtime/arith.scm index 51042d68e..9ad5d9073 100644 --- a/src/runtime/arith.scm +++ b/src/runtime/arith.scm @@ -882,7 +882,8 @@ USA. (declare (integrate flo:integer?)) (define (flo:integer? x) - (flo:= x (flo:round x))) + (and (flo:finite? x) + (flo:= x (flo:round x)))) (define (flo:rationalize x e) (flo:simplest-rational (flo:- x e) (flo:+ x e)))