bias exp-subnormal exp-inf/nan
(define (symbolic sign name extra)
(assert (or (= sign 0) (= sign 1)))
- (assert (<= 0 extra))
- (let ((extra (number->string extra #x10)))
- (string-append (if (zero? sign) "+" "-") name "." extra)))
+ (string-append (if (zero? sign) "+" "-") name extra))
(define (numeric sign integer width fractional exponent)
(assert (or (= sign 0) (= sign 1)))
(assert (or (= integer 0) (= integer 1)))
(fractional (extract-bit-field width 0 significand)))
(numeric sign 1 width fractional exponent)))
(lambda (sign)
- (symbolic sign "inf" 0))
+ (symbolic sign "inf" ""))
(lambda (sign quiet payload)
- (symbolic sign (if (zero? quiet) "sNaN" "qNaN") payload)))))
+ payload ;XXX Use this.
+ (symbolic sign (if (zero? quiet) "sNaN" "NaN") "")))))
(define (ieee754-binary32-hex-string x #!optional mark)
(ieee754-binary-hex-string x 8 24 mark))
(-257/256 "-0x1.01p+0")
(12345 "0x1.81c8p+13")
(123456 "0x1.e24p+16")
- (1.2061684984132626e-11 "0x1.a862p-37"))
+ (1.2061684984132626e-11 "0x1.a862p-37")
+ (+inf.0 "+inf")
+ (-inf.0 "-inf")
+ (,(flo:qnan) "+NaN")
+ (,(flo:negate (flo:qnan)) "-NaN")
+ (,(flo:snan) "+sNaN")
+ (,(flo:negate (flo:snan)) "-sNaN"))
(lambda (x s #!optional xfail)
(with-expected-failure xfail
(lambda ()