Fix unsafe multiplication.

This commit is contained in:
Vincent St-Amour 2011-07-13 12:52:28 -04:00
parent 0860e62bfa
commit cf04739f93

View File

@ -9,7 +9,6 @@
;; we assume indexes are 2 bits shorter than fixnums ;; we assume indexes are 2 bits shorter than fixnums
;; We're generating a reference to fixnum? rather than calling it, so ;; We're generating a reference to fixnum? rather than calling it, so
;; we're safe from fixnum size issues on different platforms. ;; we're safe from fixnum size issues on different platforms.
(define (index? x) (define (index? x) (and (fixnum? x) (unsafe-fx>= x 0) (fixnum? (* x 4))))
(and (fixnum? x) (unsafe-fx>= x 0) (fixnum? (unsafe-fx* x 4))))
(define exact-rational? (conjoin rational? exact?)) (define exact-rational? (conjoin rational? exact?))