BR 3392368: actually fix the documentation; add test case

Add a mimimal test case for this bug; correct the documentation.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin 2018-11-26 21:38:14 -08:00
parent 8fa279954c
commit d7498067ca
2 changed files with 29 additions and 10 deletions

View File

@ -20,11 +20,11 @@ macro. See \k{dfmtm}.
operator refers to an \c{EXTERN} symbol declared further down in the
code.
\b Fix a corner case in the floating-point code where a
binary/octal/hexadecimal floating-point constant starting with a digit
for which the upper bit is 1 (1, 4-7, 8-F respectively) and having at
least 33 mantissa bits would sometimes produce incorrect results for
the quad-precision format.
\b Fix a corner case in the floating-point code where a binary, octal
or hexadecimal floating-point constant starting with digits 1, 1-3, or
8-F, respectively, and having at least 32, 11, or 8 mantissa digits,
could produce incorrect results for the 80-bit and 128-bit
floating-point formats.
\S{cl-2.14} Version 2.14

View File

@ -26,11 +26,30 @@
dq 0xd0b29a67e95dcb60
dw 0x4057
do 0xf.ffffff8
dt 0xf.ffffff8
dq 0xf.ffffff8
dd 0xf.ffffff8
dw 0xf.ffffff8
do 0xf.ffffff8p-4
do 0q3.7777777774p-2
do 0b1.1111_1111_1111_1111_1111_1111_1111_111p-1
dt 0xf.ffffff8p-4
dt 0q3.7777777774p-2
dt 0b1.1111_1111_1111_1111_1111_1111_1111_111p-1
dq 0xf.ffffff8p-4
dq 0q3.7777777774p-2
dq 0b1.1111_1111_1111_1111_1111_1111_1111_111p-1
dd 0xf.ffffff8p-4
dd 0q3.7777777774p-2
dd 0b1.1111_1111_1111_1111_1111_1111_1111_111p-1
dw 0xf.ffffff8p-4
dw 0q3.7777777774p-2
dw 0b1.1111_1111_1111_1111_1111_1111_1111_111p-1
db 0xf.ffffff8p-4
db 0q3.7777777774p-2
db 0b1.1111_1111_1111_1111_1111_1111_1111_111p-1
;; Way too big numbers, should overflow to +Inf
dd 1.0E646456955