* "/" was producing "BUG:" report when given non-numebrs.

It now produced a better error message.
This commit is contained in:
Abdulaziz Ghuloum 2007-10-31 21:01:39 -04:00
parent 6be6dee96c
commit 186639d091
1 changed files with 3 additions and 3 deletions

View File

@ -899,7 +899,7 @@
[(fixnum? y) ($fl/ x ($fixnum->flonum y))] [(fixnum? y) ($fl/ x ($fixnum->flonum y))]
[(bignum? y) ($fl/ x (bignum->flonum y))] [(bignum? y) ($fl/ x (bignum->flonum y))]
[(ratnum? y) ($fl/ x (ratnum->flonum y))] [(ratnum? y) ($fl/ x (ratnum->flonum y))]
[else (error '/ "BUG: unspported" x y)])] [else (error '/ "not a number" y)])]
[(fixnum? x) [(fixnum? x)
(cond (cond
[(flonum? y) ($fl/ ($fixnum->flonum x) y)] [(flonum? y) ($fl/ ($fixnum->flonum x) y)]
@ -941,7 +941,7 @@
(binary- 0 (quotient y g))))]))] (binary- 0 (quotient y g))))]))]
[(ratnum? y) [(ratnum? y)
(/ (* x ($ratnum-d y)) ($ratnum-n y))] (/ (* x ($ratnum-d y)) ($ratnum-n y))]
[else (error '/ "BUG: unsupported" x y)])] [else (error '/ "not a number" y)])]
[(bignum? x) [(bignum? x)
(cond (cond
[(fixnum? y) [(fixnum? y)
@ -1020,7 +1020,7 @@
[($fx= n 1) d] [($fx= n 1) d]
[($fx= n -1) (- d)] [($fx= n -1) (- d)]
[else ($make-ratnum d n)]))] [else ($make-ratnum d n)]))]
[else (error '/ "BUG: unspported argument" x)])] [else (error '/ "not a number" x)])]
[(x y z . rest) [(x y z . rest)
(let f ([a (binary/ x y)] [b z] [ls rest]) (let f ([a (binary/ x y)] [b z] [ls rest])
(cond (cond