fixed floating point exception in (modulo <fx> 0).

This commit is contained in:
Abdulaziz Ghuloum 2009-06-30 04:10:51 +03:00
parent 6e7f0ccf84
commit 7de0f39736
2 changed files with 5 additions and 2 deletions

View File

@ -1716,7 +1716,10 @@
(cond (cond
[(fixnum? n) [(fixnum? n)
(cond (cond
[(fixnum? m) ($fxmodulo n m)] [(fixnum? m)
(if (eqv? m 0)
(die 'modulo "division by zero" n m)
($fxmodulo n m))]
[(bignum? m) [(bignum? m)
(if ($fx< n 0) (if ($fx< n 0)
(if ($bignum-positive? m) (if ($bignum-positive? m)

View File

@ -1 +1 @@
1817 1818