* Fixed two bugs in $ratnum-n and $ratnum-d
This commit is contained in:
parent
3798fd932a
commit
6712e9490b
BIN
src/ikarus.boot
BIN
src/ikarus.boot
Binary file not shown.
|
@ -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)])))
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue