diff --git a/src/ikarus.boot b/src/ikarus.boot index 38e3399..be6d522 100644 Binary files a/src/ikarus.boot and b/src/ikarus.boot differ diff --git a/src/ikarus.numerics.ss b/src/ikarus.numerics.ss index 270aa59..29849cc 100644 --- a/src/ikarus.numerics.ss +++ b/src/ikarus.numerics.ss @@ -568,6 +568,8 @@ (cond [(fixnum? x) (fixnum->flonum x)] [(bignum? x) (bignum->flonum x)] + [(ratnum? x) + (binary/ (exact->inexact ($ratnum-n x)) ($ratnum-d x))] [else (error 'exact->inexact "~s is not an exact number" x)]))) diff --git a/src/pass-specify-rep-primops.ss b/src/pass-specify-rep-primops.ss index 04cba3b..cc6341e 100644 --- a/src/pass-specify-rep-primops.ss +++ b/src/pass-specify-rep-primops.ss @@ -761,10 +761,10 @@ (define-primop $ratnum-n unsafe - [(V x) (prm 'mref (T x) (K (- vector-tag disp-ratnum-num)))]) + [(V x) (prm 'mref (T x) (K (- disp-ratnum-num vector-tag)))]) (define-primop $ratnum-d unsafe - [(V x) (prm 'mref (T x) (K (- vector-tag disp-ratnum-den)))]) + [(V x) (prm 'mref (T x) (K (- disp-ratnum-den vector-tag)))]) /section)