Changeset 26347 in project


Ignore:
Timestamp:
04/02/12 22:35:15 (8 years ago)
Author:
sjamaan
Message:

numbers: Fix a silly mistake introduced by the previous bugfix... sigh

Location:
release/4/numbers/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/numbers/trunk/numbers.scm

    r26346 r26347  
    17171717               (cond
    17181718                 ((> e +maximum-allowed-exponent+)
    1719                   (and (eq? exactness 'i) +inf.0))
     1719                  (and (eq? exactness 'i)
     1720                       (cond ((zero? value) 0.0)
     1721                             ((> value 0.0) +inf.0)
     1722                             (else -inf.0))))
    17201723                 ((< e (- +maximum-allowed-exponent+))
    17211724                  (and (eq? exactness 'i) +0.0))
  • release/4/numbers/trunk/tests/numbers-test.scm

    r26346 r26347  
    766766   (test "exact are equal" e1 e2)
    767767   (test "exact are false" e1 #f))
     768 (let* ((t1 (current-seconds))
     769        (i1 (string->number "-1e1000000"))
     770        (i2 (string->number "-1.0e1000000"))
     771        (e1 (string->number "#e-1e1000000"))
     772        (e2 (string->number "#e-1.0e1000000"))
     773        (t2 (current-seconds)))
     774   (test-assert "read time for inexacts with large positive exp isn't insanely high" (< (- t2 t1) 2))
     775   (test "negative inexact read back are equal" i1 i2)
     776   (test "negative inexact are negative inf" i1 -inf.0)
     777   (test "negative exact are equal" e1 e2)
     778   (test "negative exact are false" e1 #f))
    768779 (let* ((t1 (current-seconds))
    769780        (i1 (string->number "1e-1000000"))
Note: See TracChangeset for help on using the changeset viewer.