Changeset 15399


Ignore:
Timestamp:
May 30, 2012, 1:19:30 PM (7 years ago)
Author:
gb
Message:

PRINT.*-FLOAT.2: if the call to RANDOM returns 0, I is initialized
to -10000000 and F should be printed as -1.0e7 (it is, correctly,
but the tests don't expect that.)
See CLHS 22.1.3.1.3.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/ansi-tests/print-floats.lsp

    r8991 r15399  
    2929           for s2 = (format nil "~A.0" i)
    3030           repeat 10000
    31            unless (or (/= i (rational f)) ; not enough bits
     31           unless (or (= i -10000000) ; the only value that's out of range
     32                      (/= i (rational f)) ; not enough bits
    3233                   ;; (> (nth-value 1 (integer-decode-float f)) 0)
    3334                   (equalp s1 s2))
     
    124125           for s2 = (format nil "~A.0" i)
    125126           repeat 10000
    126            unless (or (/= i (rational f))  ;; not enough bits
    127                    ;; (> (nth-value 1 (integer-decode-float f)) 0)
    128                    (equalp s1 s2))
     127           unless (or (= i -10000000) ; out of range
     128                      (/= i (rational f))  ;; not enough bits
     129                      ;; (> (nth-value 1 (integer-decode-float f)) 0)
     130                      (equalp s1 s2))
    129131           collect (list i f s1 s2))))
    130132  nil)
     
    219221           for s2 = (format nil "~A.0" i)
    220222           repeat 10000
    221            unless (or (/= i (rational f))  ;; not enough bits
    222                    ;; (> (nth-value 1 (integer-decode-float f)) 0)
    223                    (equalp s1 s2))
     223           unless (or (= i -10000000)
     224                      (/= i (rational f))  ;; not enough bits
     225                      ;; (> (nth-value 1 (integer-decode-float f)) 0)
     226                      (equalp s1 s2))
    224227           collect (list i f s1 s2))))
    225228  nil)
     
    314317           for s2 = (format nil "~A.0" i)
    315318           repeat 10000
    316            unless (or (/= i (rational f)) ;; not enough bits
    317                    ;; (> (nth-value 1 (integer-decode-float f)) 0)
    318                    (equalp s1 s2))
     319           unless (or (= i -10000000)
     320                      (/= i (rational f)) ;; not enough bits
     321                      ;; (> (nth-value 1 (integer-decode-float f)) 0)
     322                      (equalp s1 s2))
    319323           collect (list i f s1 s2))))
    320324  nil)
Note: See TracChangeset for help on using the changeset viewer.