Simple test for hexadecimal floating-point numbers

Very trivial test for hexadecimal floating-point numbers
This commit is contained in:
H. Peter Anvin 2007-09-18 18:37:36 -07:00
parent 26976a187f
commit 72ac77bb0b

125
test/floatx.asm Normal file
View File

@ -0,0 +1,125 @@
;
; floatx.asm
;
; Test hexadecimal floating-point numbers
; 16-bit
dw 1.0
dw 0x1.0
dw 2.0
dw 0x2.0
dw 0x1.0p+1
dw 0x1.0p-1
dw 0x0.0
dw 0x1.23456789
dw 0x0.123456789
dw 0x0.0000123456789
dw 0x1.23456789p10
dw 0x1.23456789p+10
dw 0x1.23456789p-10
dw 0x0.123456789p10
dw 0x0.123456789p+10
dw 0x0.123456789abcdef0123456789abcdef012345p-10
dw 0x0.0000123456789
dw 0x0.0000123456789p+10
dw 0x0.0000123456789p-10
; 32-bit
dd 1.0
dd 0x1.0
dd 2.0
dd 0x2.0
dd 0x1.0p+1
dd 0x1.0p-1
dd 0x0.0
dd 0x1.23456789
dd 0x0.123456789
dd 0x0.0000123456789
dd 0x1.23456789p10
dd 0x1.23456789p+10
dd 0x1.23456789p-10
dd 0x0.123456789p10
dd 0x0.123456789p+10
dd 0x0.123456789abcdef0123456789abcdef012345p-10
dd 0x0.0000123456789
dd 0x0.0000123456789p+10
dd 0x0.0000123456789p-10
dd 0x123456789.0
dd 0x0000123456789.0
dd 0x123456789.0p+0
dd 0x123456789.0p+64
; 64-bit
dq 1.0
dq 0x1.0
dq 2.0
dq 0x2.0
dq 0x1.0p+1
dq 0x1.0p-1
dq 0x0.0
dq 0x1.23456789
dq 0x0.123456789
dq 0x0.0000123456789
dq 0x1.23456789p10
dq 0x1.23456789p+10
dq 0x1.23456789p-10
dq 0x0.123456789p10
dq 0x0.123456789p+10
dq 0x0.123456789abcdef0123456789abcdef012345p-10
dq 0x0.0000123456789
dq 0x0.0000123456789p+10
dq 0x0.0000123456789p-10
dq 0x123456789.0
dq 0x0000123456789.0
dq 0x123456789.0p+0
dq 0x123456789.0p+300
; 80-bit
dt 1.0
dt 0x1.0
dt 2.0
dt 0x2.0
dt 0x1.0p+1
dt 0x1.0p-1
dt 0x0.0
dt 0x1.23456789
dt 0x0.123456789
dt 0x0.0000123456789
dt 0x1.23456789p10
dt 0x1.23456789p+10
dt 0x1.23456789p-10
dt 0x0.123456789p10
dt 0x0.123456789p+10
dt 0x0.123456789abcdef0123456789abcdef012345p-10
dt 0x0.0000123456789
dt 0x0.0000123456789p+10
dt 0x0.0000123456789p-10
dt 0x123456789.0
dt 0x0000123456789.0
dt 0x123456789.0p+0
dt 0x123456789.0p+1024
; 128-bit
do 1.0
do 0x1.0
do 2.0
do 0x2.0
do 0x1.0p+1
do 0x1.0p-1
do 0x0.0
do 0x1.23456789
do 0x0.123456789
do 0x0.0000123456789
do 0x1.23456789p10
do 0x1.23456789p+10
do 0x1.23456789p-10
do 0x0.123456789p10
do 0x0.123456789p+10
do 0x0.123456789abcdef0123456789abcdef012345p-10
do 0x0.0000123456789
do 0x0.0000123456789p+10
do 0x0.0000123456789p-10
do 0x123456789.0
do 0x0000123456789.0
do 0x123456789.0p+0
do 0x123456789.0p+1024