diff --git a/scheme/bcomp/comp-prim.scm b/scheme/bcomp/comp-prim.scm index 6fb60a6..843ea1c 100644 --- a/scheme/bcomp/comp-prim.scm +++ b/scheme/bcomp/comp-prim.scm @@ -74,9 +74,9 @@ (exact? ,(proc (number-type) boolean-type)) (exact->inexact - ,(proc (exact-type) inexact-type)) + ,(proc (number-type) inexact-type)) (inexact->exact - ,(proc (inexact-type) exact-type)) + ,(proc (number-type) exact-type)) ((exp log sin cos tan asin acos sqrt) ,(proc (number-type) number-type)) ((atan) diff --git a/scheme/rts/xnum.scm b/scheme/rts/xnum.scm index 402f1e3..208b614 100644 --- a/scheme/rts/xnum.scm +++ b/scheme/rts/xnum.scm @@ -216,9 +216,12 @@ (define-simple-type :exact (:number) (lambda (n) (and (number? n) (exact? n)))) +(define-method &inexact->exact ((n :exact)) n) + (define-simple-type :inexact (:number) (lambda (n) (and (number? n) (inexact? n)))) +(define-method &exact->inexact ((n :inexact)) n) ; Whattakludge.