projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4370a4b
)
Make flo:integer? answer true only for finite inputs.
author
Taylor R Campbell
<campbell@mumble.net>
Fri, 16 Nov 2018 17:00:10 +0000
(17:00 +0000)
committer
Chris Hanson
<org/chris-hanson/cph>
Tue, 20 Nov 2018 04:01:02 +0000
(20:01 -0800)
src/runtime/arith.scm
patch
|
blob
|
history
diff --git
a/src/runtime/arith.scm
b/src/runtime/arith.scm
index 51042d68e26f02cbecadf5281a9a700a67b7961c..9ad5d907303bee2968a51f8f48c455eaf89bd6eb 100644
(file)
--- 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)))