From 72ac77bb0b37990aa7cae7a058ae646135280301 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 18 Sep 2007 18:37:36 -0700 Subject: Simple test for hexadecimal floating-point numbers Very trivial test for hexadecimal floating-point numbers --- test/floatx.asm | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 test/floatx.asm (limited to 'test') diff --git a/test/floatx.asm b/test/floatx.asm new file mode 100644 index 0000000..f513ec8 --- /dev/null +++ b/test/floatx.asm @@ -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 -- cgit v1.2.3