From 29136cc5c1e31e8839d1424908ca561f34c52fab Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Fri, 16 Nov 2018 17:00:10 +0000 Subject: [PATCH] Make flo:integer? answer true only for finite inputs. --- src/runtime/arith.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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))) -- 2.25.1