* Fixed bug 160975: flabs is broken

- flabs had reversed comparison (negating the positive instead of
    the negative), fixed.
  - abs was also broken around -0.0, fixed.
This commit is contained in:
Abdulaziz Ghuloum 2007-11-08 13:16:26 -05:00
parent 82c3e568c7
commit cd3d4ab77a
1 changed files with 2 additions and 2 deletions

View File

@ -226,7 +226,7 @@
(define (flabs x)
(if (flonum? x)
(if ($fl> x 0.0)
(if ($fx> ($flonum-u8-ref x 0) 127)
($fl* x -1.0)
x)
(error 'flabs "not a flonum" x)))
@ -1117,7 +1117,7 @@
[(bignum? x)
(if ($bignum-positive? x) x (- x))]
[(flonum? x)
(if ($flnegative? x)
(if ($fx> ($flonum-u8-ref x 0) 127)
($fl* x -1.0)
x)]
[(ratnum? x)