fixed error in division in (/ 0 <bignum>)
This commit is contained in:
parent
4ca8b1add2
commit
7d6316f723
|
@ -1233,9 +1233,11 @@
|
|||
(binary- 0 (fxquotient x g))
|
||||
(binary- 0 (fxquotient y g)))])))])]
|
||||
[(bignum? y)
|
||||
(if ($fx= x 0)
|
||||
0
|
||||
(let ([g (binary-gcd x y)])
|
||||
(cond
|
||||
[(= g y) (quotient x g)] ;;; should not happen
|
||||
[(= g y) (quotient x g)]
|
||||
[($bignum-positive? y)
|
||||
(if ($fx= g 1)
|
||||
($make-ratnum x y)
|
||||
|
@ -1245,7 +1247,7 @@
|
|||
($make-ratnum (binary- 0 x) (binary- 0 y))
|
||||
($make-ratnum
|
||||
(binary- 0 (fxquotient x g))
|
||||
(binary- 0 (quotient y g))))]))]
|
||||
(binary- 0 (quotient y g))))])))]
|
||||
[(ratnum? y)
|
||||
(/ (* x ($ratnum-d y)) ($ratnum-n y))]
|
||||
[(or (compnum? y) (cflonum? y)) (x/compy x y)]
|
||||
|
|
|
@ -1 +1 @@
|
|||
1753
|
||||
1754
|
||||
|
|
Loading…
Reference in New Issue