4 ; Test hexadecimal floating-point numbers
6 %define Inf __Infinity__
25 dw 0x0.123456789abcdef0123456789abcdef012345p
-10
27 dw 0x0.0000123456789p
+10
28 dw 0x0.0000123456789p
-10
29 dw 0x1.0p
-25 ; Underflow
30 dw 0x1.01p
-25 ; Rounds to denorm
31 dw 0x1.0p
-24 ; Smallest denorm
32 dw 0x1.ffffffffffffffffffffffffffffp
-16 ; Rounds to denorm
34 dw 0x1.ffffffffffffffffffffffffffffp
-15 ; Rounds to normal
35 dw 0x1.0p
-14 ; Smallest non-denorm
36 dw 0x1.0p
+15 ; Biggest possible exponent
37 dw 0x1.ffffffffffffffffffffffffffffp
+15 ; Rounds to infinity
57 dd 0x0.123456789abcdef0123456789abcdef012345p
-10
59 dd 0x0.0000123456789p
+10
60 dd 0x0.0000123456789p
-10
65 dd 0x1.0p
-150 ; Underflow
66 dd 0x1.01p
-150 ; Rounds to denorm
67 dd 0x1.0p
-149 ; Smallest denorm
68 dd 0x1.ffffffffffffffffffffffffffffp
-128 ; Rounds to denorm
69 dd 0x1.0p
-127 ; Denorm
70 dd 0x1.ffffffffffffffffffffffffffffp
-127 ; Rounds to normal
71 dd 0x1.0p
-126 ; Smallest non-denorm
72 dd 0x1.0p
+127 ; Biggest possible exponent
73 dd 0x1.ffffffffffffffffffffffffffffp
+127 ; Rounds to infinity
93 dq 0x0.123456789abcdef0123456789abcdef012345p
-10
95 dq 0x0.0000123456789p
+10
96 dq 0x0.0000123456789p
-10
100 dq 0x123456789.0p
+300
101 dq 0x1.0p
-1075 ; Underflow
102 dq 0x1.01p
-1075 ; Rounds to denorm
103 dq 0x1.0p
-1074 ; Smallest denorm
104 dq 0x1.ffffffffffffffffffffffffffffp
-1024 ; Rounds to denorm
105 dq 0x1.0p
-1023 ; Denorm
106 dq 0x1.ffffffffffffffffffffffffffffp
-1023 ; Rounds to normal
107 dq 0x1.0p
-1022 ; Smallest non-denorm
108 dq 0x1.0p
+1023 ; Biggest possible exponent
109 dq 0x1.ffffffffffffffffffffffffffffp
+1023 ; Rounds to infinity
129 dt 0x0.123456789abcdef0123456789abcdef012345p
-10
131 dt 0x0.0000123456789p
+10
132 dt 0x0.0000123456789p
-10
136 dt 0x123456789.0p
+1024
137 dt 0x1.0p
-16446 ; Underflow
138 dt 0x1.01p
-16446 ; Rounds to denorm
139 dt 0x1.0p
-16445 ; Smallest denorm
140 dt 0x1.ffffffffffffffffffffffffffffp
-16384 ; Rounds to denorm
141 dt 0x1.0p
-16383 ; Denorm
142 dt 0x1.ffffffffffffffffffffffffffffp
-16383 ; Rounds to normal
143 dt 0x1.0p
-16382 ; Smallest non-denorm
144 dt 0x1.0p
+16383 ; Biggest possible exponent
145 dt 0x1.ffffffffffffffffffffffffffffp
+16383 ; Rounds to infinity
165 do
0x0.123456789abcdef0123456789abcdef012345p
-10
167 do
0x0.0000123456789p
+10
168 do
0x0.0000123456789p
-10
172 do
0x123456789.0p
+1024
173 do
0x1.0p
-16495 ; Underflow
174 do
0x1.01p
-16495 ; Rounds to denorm
175 do
0x1.0p
-16494 ; Smallest denorm
176 do
0x1.ffffffffffffffffffffffffffffffffp
-16384 ; Rounds to denorm
177 do
0x1.0p
-16383 ; Denorm
178 do
0x1.ffffffffffffffffffffffffffffffffp
-16383 ; Rounds to normal
179 do
0x1.0p
-16382 ; Smallest non-denorm
180 do
0x1.0p
+16383 ; Biggest possible exponent
181 do
0x1.ffffffffffffffffffffffffffffffffp
+16383 ; Rounds to infinity
201 dw 0h0.123456789abcdef0123456789abcdef012345p
-10
203 dw 0h0.0000123456789p
+10
204 dw 0h0.0000123456789p
-10
205 dw 0h1.0p
-25 ; Underflow
206 dw 0h1.0p
-24 ; Smallest denorm
207 dw 0h1.ffffffffffffffffffffffffffffp
-16 ; Rounds to denorm
208 dw 0h1.0p
-15 ; Denorm
209 dw 0h1.ffffffffffffffffffffffffffffp
-15 ; Rounds to normal
210 dw 0h1.0p
-14 ; Smallest non-denorm
211 dw 0h1.0p
+15 ; Biggest possible exponent
212 dw 0h1.ffffffffffffffffffffffffffffp
+15 ; Rounds to infinity
232 dd 0h0.123456789abcdef0123456789abcdef012345p
-10
234 dd 0h0.0000123456789p
+10
235 dd 0h0.0000123456789p
-10
240 dd 0h1.0p
-150 ; Underflow
241 dd 0h1.0p
-149 ; Smallest denorm
242 dd 0h1.ffffffffffffffffffffffffffffp
-128 ; Rounds to denorm
243 dd 0h1.0p
-127 ; Denorm
244 dd 0h1.ffffffffffffffffffffffffffffp
-127 ; Rounds to normal
245 dd 0h1.0p
-126 ; Smallest non-denorm
246 dd 0h1.0p
+127 ; Biggest possible exponent
247 dd 0h1.ffffffffffffffffffffffffffffp
+127 ; Rounds to infinity
267 dq 0h0.123456789abcdef0123456789abcdef012345p
-10
269 dq 0h0.0000123456789p
+10
270 dq 0h0.0000123456789p
-10
274 dq 0h123456789.0p
+300
275 dq 0h1.0p
-1075 ; Underflow
276 dq 0h1.0p
-1074 ; Smallest denorm
277 dq 0h1.ffffffffffffffffffffffffffffp
-1024 ; Rounds to denorm
278 dq 0h1.0p
-1023 ; Denorm
279 dq 0h1.ffffffffffffffffffffffffffffp
-1023 ; Rounds to normal
280 dq 0h1.0p
-1022 ; Smallest non-denorm
281 dq 0h1.0p
+1023 ; Biggest possible exponent
282 dq 0h1.ffffffffffffffffffffffffffffp
+1023 ; Rounds to infinity
302 dt 0h0.123456789abcdef0123456789abcdef012345p
-10
304 dt 0h0.0000123456789p
+10
305 dt 0h0.0000123456789p
-10
309 dt 0h123456789.0p
+1024
310 dt 0h1.0p
-16446 ; Underflow
311 dt 0h1.0p
-16445 ; Smallest denorm
312 dt 0h1.ffffffffffffffffffffffffffffp
-16384 ; Rounds to denorm
313 dt 0h1.0p
-16383 ; Denorm
314 dt 0h1.ffffffffffffffffffffffffffffp
-16383 ; Rounds to normal
315 dt 0h1.0p
-16382 ; Smallest non-denorm
316 dt 0h1.0p
+16383 ; Biggest possible exponent
317 dt 0h1.ffffffffffffffffffffffffffffp
+16383 ; Rounds to infinity
337 do
0h0.123456789abcdef0123456789abcdef012345p
-10
339 do
0h0.0000123456789p
+10
340 do
0h0.0000123456789p
-10
344 do
0h123456789.0p
+1024
345 do
0h1.0p
-16495 ; Underflow
346 do
0h1.0p
-16494 ; Smallest denorm
347 do
0h1.ffffffffffffffffffffffffffffffffp
-16384 ; Rounds to denorm
348 do
0h1.0p
-16383 ; Denorm
349 do
0h1.ffffffffffffffffffffffffffffffffp
-16383 ; Rounds to normal
350 do
0h1.0p
-16382 ; Smallest non-denorm
351 do
0h1.0p
+16383 ; Biggest possible exponent
352 do
0h1.ffffffffffffffffffffffffffffffffp
+16383 ; Rounds to infinity
372 dw $0.123456789abcdef0123456789abcdef012345p
-10
374 dw $0.0000123456789p
+10
375 dw $0.0000123456789p
-10
376 dw $1.0p
-25 ; Underflow
377 dw $1.0p
-24 ; Smallest denorm
378 dw $1.ffffffffffffffffffffffffffffp
-16 ; Rounds to denorm
380 dw $1.ffffffffffffffffffffffffffffp
-15 ; Rounds to normal
381 dw $1.0p
-14 ; Smallest non-denorm
382 dw $1.0p
+15 ; Biggest possible exponent
383 dw $1.ffffffffffffffffffffffffffffp
+15 ; Rounds to infinity
403 dd $0.123456789abcdef0123456789abcdef012345p
-10
405 dd $0.0000123456789p
+10
406 dd $0.0000123456789p
-10
411 dd $1.0p
-150 ; Underflow
412 dd $1.0p
-149 ; Smallest denorm
413 dd $1.ffffffffffffffffffffffffffffp
-128 ; Rounds to denorm
414 dd $1.0p
-127 ; Denorm
415 dd $1.ffffffffffffffffffffffffffffp
-127 ; Rounds to normal
416 dd $1.0p
-126 ; Smallest non-denorm
417 dd $1.0p
+127 ; Biggest possible exponent
418 dd $1.ffffffffffffffffffffffffffffp
+127 ; Rounds to infinity
438 dq $0.123456789abcdef0123456789abcdef012345p
-10
440 dq $0.0000123456789p
+10
441 dq $0.0000123456789p
-10
446 dq $1.0p
-1075 ; Underflow
447 dq $1.0p
-1074 ; Smallest denorm
448 dq $1.ffffffffffffffffffffffffffffp
-1024 ; Rounds to denorm
449 dq $1.0p
-1023 ; Denorm
450 dq $1.ffffffffffffffffffffffffffffp
-1023 ; Rounds to normal
451 dq $1.0p
-1022 ; Smallest non-denorm
452 dq $1.0p
+1023 ; Biggest possible exponent
453 dq $1.ffffffffffffffffffffffffffffp
+1023 ; Rounds to infinity
473 dt $0.123456789abcdef0123456789abcdef012345p
-10
475 dt $0.0000123456789p
+10
476 dt $0.0000123456789p
-10
480 dt $123456789.0p
+1024
481 dt $1.0p
-16446 ; Underflow
482 dt $1.0p
-16445 ; Smallest denorm
483 dt $1.ffffffffffffffffffffffffffffp
-16384 ; Rounds to denorm
484 dt $1.0p
-16383 ; Denorm
485 dt $1.ffffffffffffffffffffffffffffp
-16383 ; Rounds to normal
486 dt $1.0p
-16382 ; Smallest non-denorm
487 dt $1.0p
+16383 ; Biggest possible exponent
488 dt $1.ffffffffffffffffffffffffffffp
+16383 ; Rounds to infinity
508 do
$0.123456789abcdef0123456789abcdef012345p
-10
510 do
$0.0000123456789p
+10
511 do
$0.0000123456789p
-10
515 do
$123456789.0p
+1024
516 do
$1.0p
-16495 ; Underflow
517 do
$1.0p
-16494 ; Smallest denorm
518 do
$1.ffffffffffffffffffffffffffffffffp
-16384 ; Rounds to denorm
519 do
$1.0p
-16383 ; Denorm
520 do
$1.ffffffffffffffffffffffffffffffffp
-16383 ; Rounds to normal
521 do
$1.0p
-16382 ; Smallest non-denorm
522 do
$1.0p
+16383 ; Biggest possible exponent
523 do
$1.ffffffffffffffffffffffffffffffffp
+16383 ; Rounds to infinity