diff options
Diffstat (limited to 'module/system')
-rw-r--r-- | module/system/base/target.scm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/module/system/base/target.scm b/module/system/base/target.scm index 7c6e0aca0..95ab8d8c9 100644 --- a/module/system/base/target.scm +++ b/module/system/base/target.scm @@ -33,7 +33,8 @@ target-max-vector-length target-most-negative-fixnum - target-most-positive-fixnum)) + target-most-positive-fixnum + target-fixnum?)) @@ -179,3 +180,9 @@ target platform." "Return the most positive integer representable as a fixnum on the target platform." (1- (ash 1 (- (* (target-word-size) 8) 3)))) + +(define (target-fixnum? n) + (and (exact-integer? n) + (<= (target-most-negative-fixnum) + n + (target-most-positive-fixnum)))) |