|
---- Michel Hack Wrote: ---- > If there were fewer than 400 test cases, could you simply post them
here? ----------------------------- Michel, Below (and attached as text) are the 64-bit testcases. I have attached
the 128-bit testcases as text only. Let me know if you have any
questions. Thanks, Chuck ------------------------------ typedef struct { UINT64 operandA, operandB; int expectedResult; FPSC expectedFPSC; } test_case; test_case test_table[N] = { { 0x0000000000000000, 0x0000000000000000, 1, 0x00000000}, // test0: zero
EQUALS zero { 0x8000000000000000, 0x0000000000000000, 1, 0x00000000}, // test1: zero
EQUALS negative zero { 0x0000000000000000, 0x8000000000000000, 1, 0x00000000}, // test2:
negative zero EQUALS zero { 0x8000000000000000, 0x8000000000000000, 1, 0x00000000}, // test3: negative
zero EQUALS negative zero { 0x8000000000000000, 0x7c00000000000000, 0, 0x00000000}, // test4:
negative zero NOTEQUAL NAN { 0x0000000000000000, 0x7c00000000000000, 0, 0x00000000}, // test5: zero
NOTEQUAL NAN { 0x7c00000000000000, 0x7c00000000000000, 0, 0x00000000}, // test6: NAN
NOTEQUAL NAN { 0x0060000000000001, 0x00000000000003e8, 1, 0x00000000}, // test7:
1x10^3 EQUALS 1000x10^0 { 0x000a000000000001, 0x00000000000003e8, 0, 0x00000000}, // test8:
1x10^5 NOTEQUAL 1000x10^0 { 0x7c00000000000000, 0x7c00000000000000, 0, 0x00000000}, // test9: NAN
NOTEQUAL INFINITY { 0x7800000000000000, 0x7800000000000000, 1, 0x00000000}, //
test10:INFINITY EQUALS INFINITY { 0x84000000003d03be, 0x84000000003d03be, 1, 0x00000000}, //
test11:-3998654x10^32 EQUAL -39986543x10^32 { 0x04000000003d03be, 0x84000000003d03be, 0, 0x00000000}, //
test12:+3998654x10^32 NOTEQUAL -39986543x10^32 { 0x83e00000003d03be, 0x84000000003d03be, 0, 0x00000000}, //
test13:-3998654x10^31 NOTEQUAL -39986543x10^32 { 0x03e00000003d03be, 0x04000000003d03be, 0, 0x00000000}, //
test14:+3998654x10^31 NOTEQUAL +39986543x10^32 { 0x03e000000262256c, 0x04000000003d03be, 1, 0x00000000}, //
test15:+39986540x10^31 EQUAL +39986543x10^32 { 0x03c0000017d57638, 0x04000000003d03be, 1, 0x00000000}, // test16:+399865400x10^30
EQUAL +39986543x10^32 { 0x03a00000EE569E30, 0x04000000003d03be, 1, 0x00000000}, //
test17:+3998654000x10^29 EQUAL +39986543x10^32 { 0x038000094f622de0, 0x04000000003d03be, 1, 0x00000000}, //
test18:+39986540000x10^28 EQUAL +39986543x10^32 { 0x0360005d19d5cac0, 0x04000000003d03be, 1, 0x00000000}, //
test19:+39986540000x10^27 EQUAL +39986543x10^32 { 0x034003a30259eb80, 0x04000000003d03be, 1, 0x00000000}, //
test20:+39986540000x10^26 EQUAL +39986543x10^32 { 0x0320245e17833300, 0x04000000003d03be, 1, 0x00000000}, //
test21:+39986540000x10^25 EQUAL +39986543x10^32 { 0x03016baceb1ffe00, 0x04000000003d03be, 1, 0x00000000}, //
test22:+39986540000x10^24 EQUAL +39986543x10^32 { 0x02ee34c12f3fec00, 0x04000000003d03be, 1, 0x00000000}, //
test23:+39986540000x10^23 EQUAL +39986543x10^32 { 0x04000000003d03be, 0x03e000000262256c, 1, 0x00000000}, //
test24:+39986540x10^31 EQUAL +39986543x10^32 (test15, ops rev) { 0x04000000003d03be, 0x03c0000017d57638, 1, 0x00000000}, //
test25:+399865400x10^30 EQUAL +39986543x10^32 (test16, ops rev) { 0x04000000003d03be, 0x03a00000EE569E30, 1, 0x00000000}, //
test26:+3998654000x10^29 EQUAL +39986543x10^32 (test17, ops rev) { 0x04000000003d03be, 0x038000094f622de0, 1, 0x00000000}, //
test27:+39986540000x10^28 EQUAL +39986543x10^32 (test18, ops rev) { 0x04000000003d03be, 0x0360005d19d5cac0, 1, 0x00000000}, //
test28:+39986540000x10^27 EQUAL +39986543x10^32 (test19, ops rev) { 0x04000000003d03be, 0x034003a30259eb80, 1, 0x00000000}, //
test29:+39986540000x10^26 EQUAL +39986543x10^32 (test20, ops rev) { 0x04000000003d03be, 0x0320245e17833300, 1, 0x00000000}, //
test30:+39986540000x10^25 EQUAL +39986543x10^32 (test21, ops rev) { 0x04000000003d03be, 0x03016baceb1ffe00, 1, 0x00000000}, //
test31:+39986540000x10^24 EQUAL +39986543x10^32 (test22, ops rev) { 0x04000000003d03be, 0x02ee34c12f3fec00, 1, 0x00000000}, //
test32:+39986540000x10^23 EQUAL +39986543x10^32 (test23, ops rev) { 0x83e000000262256c, 0x04000000003d03be, 0, 0x00000000}, //
test33:+39986540x10^31 NOTEQUAL -39986543x10^32 (tests33-50 same as 15-32, with
opposite signs) { 0x83c0000017d57638, 0x04000000003d03be, 0, 0x00000000}, //
test34:+399865400x10^30 NOTEQUAL -39986543x10^32 { 0x83a00000EE569E30, 0x04000000003d03be, 0, 0x00000000}, //
test35:+3998654000x10^29 NOTEQUAL -39986543x10^32 { 0x838000094f622de0, 0x04000000003d03be, 0, 0x00000000}, //
test36:+39986540000x10^28 NOTEQUAL -39986543x10^32 { 0x8360005d19d5cac0, 0x04000000003d03be, 0, 0x00000000}, //
test37:+39986540000x10^27 NOTEQUAL -39986543x10^32 { 0x834003a30259eb80, 0x04000000003d03be, 0, 0x00000000}, //
test38:+39986540000x10^26 NOTEQUAL -39986543x10^32 { 0x8320245e17833300, 0x04000000003d03be, 0, 0x00000000}, //
test39:+39986540000x10^25 NOTEQUAL -39986543x10^32 { 0x83016baceb1ffe00, 0x04000000003d03be, 0, 0x00000000}, //
test40:+39986540000x10^24 NOTEQUAL -39986543x10^32 { 0x82ee34c12f3fec00, 0x04000000003d03be, 0, 0x00000000}, //
test41:+39986540000x10^23 NOTEQUAL -39986543x10^32 { 0x84000000003d03be, 0x03e000000262256c, 0, 0x00000000}, //
test42:+39986540x10^31 NOTEQUAL -39986543x10^32 (test15, ops rev) { 0x84000000003d03be, 0x03c0000017d57638, 0, 0x00000000}, //
test43:+399865400x10^30 NOTEQUAL -39986543x10^32 (test16, ops rev) { 0x84000000003d03be, 0x03a00000EE569E30, 0, 0x00000000}, //
test44:+3998654000x10^29 NOTEQUAL -39986543x10^32 (test17, ops rev) { 0x84000000003d03be, 0x038000094f622de0, 0, 0x00000000}, //
test45:+39986540000x10^28 NOTEQUAL -39986543x10^32 (test18, ops rev) { 0x84000000003d03be, 0x0360005d19d5cac0, 0, 0x00000000}, //
test46:+39986540000x10^27 NOTEQUAL -39986543x10^32 (test19, ops rev) { 0x84000000003d03be, 0x034003a30259eb80, 0, 0x00000000}, //
test47:+39986540000x10^26 NOTEQUAL -39986543x10^32 (test20, ops rev) { 0x84000000003d03be, 0x0320245e17833300, 0, 0x00000000}, //
test48:+39986540000x10^25 NOTEQUAL -39986543x10^32 (test21, ops rev) { 0x84000000003d03be, 0x03016baceb1ffe00, 0, 0x00000000}, //
test49:+39986540000x10^24 NOTEQUAL -39986543x10^32 (test22, ops rev) { 0x84000000003d03be, 0x02ee34c12f3fec00, 0, 0x00000000}, //
test50:+39986540000x10^23 NOTEQUAL -39986543x10^32 (test23, ops rev) { 0x84000000003d03be, 0x82ee34c12f3fec00, 1, 0x00000000}, //
test51:+9x10^0 EQUAL +9x10^0 (test23, ops rev) { 0x83e000000262256c, 0x84000000003d03be, 1, 0x00000000}, //
test52:-39986540x10^31 EQUAL -39986543x10^32 (tests33-50 same as 15-32, with
opposite signs) { 0x83c0000017d57638, 0x84000000003d03be, 1, 0x00000000}, //
test53:-399865400x10^30 EQUAL -39986543x10^32 { 0x83a00000EE569E30, 0x84000000003d03be, 1, 0x00000000}, //
test54:-3998654000x10^29 EQUAL -39986543x10^32 { 0x838000094f622de0, 0x84000000003d03be, 1, 0x00000000}, //
test55:-39986540000x10^28 EQUAL -39986543x10^32 { 0x8360005d19d5cac0, 0x84000000003d03be, 1, 0x00000000}, //
test56:-39986540000x10^27 EQUAL -39986543x10^32 { 0x834003a30259eb80, 0x84000000003d03be, 1, 0x00000000}, //
test57:-39986540000x10^26 EQUAL -39986543x10^32 { 0x8320245e17833300, 0x84000000003d03be, 1, 0x00000000}, //
test58:-39986540000x10^25 EQUAL -39986543x10^32 { 0x83016baceb1ffe00, 0x84000000003d03be, 1, 0x00000000}, //
test59:-39986540000x10^24 EQUAL -39986543x10^32 { 0x82ee34c12f3fec00, 0x84000000003d03be, 1, 0x00000000}, //
test60:-39986540000x10^23 EQUAL -39986543x10^32 { 0x84000000003d03be, 0x83e000000262256c, 1, 0x00000000}, //
test61:-39986540x10^31 EQUAL -39986543x10^32 (test15, ops rev) { 0x84000000003d03be, 0x83c0000017d57638, 1, 0x00000000}, //
test62:-399865400x10^30 EQUAL -39986543x10^32 (test16, ops rev) { 0x84000000003d03be, 0x83a00000EE569E30, 1, 0x00000000}, //
test63:-3998654000x10^29 EQUAL -39986543x10^32 (test17, ops rev) { 0x84000000003d03be, 0x838000094f622de0, 1, 0x00000000}, //
test64:-39986540000x10^28 EQUAL -39986543x10^32 (test18, ops rev) { 0x84000000003d03be, 0x8360005d19d5cac0, 1, 0x00000000}, //
test65:-39986540000x10^27 EQUAL -39986543x10^32 (test19, ops rev) { 0x84000000003d03be, 0x834003a30259eb80, 1, 0x00000000}, //
test66:-39986540000x10^26 EQUAL -39986543x10^32 (test20, ops rev) { 0x84000000003d03be, 0x8320245e17833300, 1, 0x00000000}, //
test67:-39986540000x10^25 EQUAL -39986543x10^32 (test21, ops rev) { 0x84000000003d03be, 0x83016baceb1ffe00, 1, 0x00000000}, //
test68:-39986540000x10^24 EQUAL -39986543x10^32 (test22, ops rev) { 0x84000000003d03be, 0x82ee34c12f3fec00, 1, 0x00000000}, //
test69:-39986540000x10^23 EQUAL -39986543x10^32 (test23, ops rev) { 0x0000000000000000, 0x7800000000000000, 0, 0x00000000}, // test70:
zero NOTEQUAL INFINITY { 0x8000000000000000, 0x7800000000000000, 0, 0x00000000}, //
test71:-zero NOTEQUAL INFINITY { 0x8000000000000000, 0xfc00000000000000, 0, 0x00000000}, //
test72:-zero NOTEQUAL - { 0xfc00000000000000, 0xfc00000000000000, 0, 0x00000000}, // test73:-NAN
NOTEQUAL - { 0x8060000000000001, 0x80000000000003e8, 1, 0x00000000}, //
test74:-1x10^3 EQUALS -1000x10^0 { 0x800a000000000001, 0x80000000000003e8, 0, 0x00000000}, //
test75:-1x10^5 NOTEQUAL -1000x10^0 { 0xfc00000000000000, 0xfc00000000000000, 0, 0x00000000}, // test76:-NAN
NOTEQUAL -INFINITY { 0xf800000000000000, 0x7800000000000000, 0, 0x00000000}, //
test77:-NEGINFINITY NOTEQUAL INFINITY { 0x8000000000000000, 0x7c00000000000000, 0, 0x00000000}, //
test78:-zero NOTEQUAL NAN { 0xfc00000000000000, 0x7c00000000000000, 0, 0x00000000}, // test79:-NAN
NOTEQUAL NAN { 0x8060000000000001, 0x00000000000003e8, 0, 0x00000000}, //
test80:-1x10^3 NOTEQUAL 1000x10^0 { 0x800a000000000001, 0x00000000000003e8, 0, 0x00000000}, //
test81:-1x10^5 NOTEQUAL 1000x10^0 { 0xfc00000000000000, 0x7c00000000000000, 0, 0x00000000}, // test82:-NAN
NOTEQUAL INFINITY { 0x7800000000000000, 0xf800000000000000, 0, 0x00000000}, //
test83:-INFINITY NOTEQUAL NEGINFINITY { 0x8c80000000000001, 0x8c80000000000001, 1, 0x00000000}, //
test84:-1x10^100 EQUAL -1x10^100 { 0x8c6000000000000a, 0x8c80000000000001, 1, 0x00000000}, //
test85:-10x10^99 EQUAL -1x10^100 { 0x8c40000000000064, 0x8c80000000000001, 1, 0x00000000}, //
test86:-100x10^98 EQUAL -1x10^100 { 0x8c200000000003e8, 0x8c80000000000001, 1, 0x00000000}, //
test87:-1000x10^97 EQUAL -1x10^100 { 0x8c00000000002710, 0x8c80000000000001, 1, 0x00000000}, //
test88:-10000x10^96 EQUAL -1x10^100 { 0x8be00000000186a0, 0x8c80000000000001, 1, 0x00000000}, // test89:-100000x10^95
EQUAL -1x10^100 { 0x8bc00000000F4240, 0x8c80000000000001, 1, 0x00000000}, //
test90:-1000000x10^94 EQUAL -1x10^100 { 0x8ba0000000989680, 0x8c80000000000001, 1, 0x00000000}, //
test91:-10000000x10^93 EQUAL -1x10^100 { 0x8b80000005f5e100, 0x8c80000000000001, 1, 0x00000000}, //
test92:-100000000x10^92 EQUAL -1x10^100 { 0x8b6000003b9aca00, 0x8c80000000000001, 1, 0x00000000}, //
test93:-1000000000x10^91 EQUAL -1x10^100 { 0x8b400002540be400, 0x8c80000000000001, 1, 0x00000000}, //
test94:-10000000000x10^99 EQUAL -1x10^100 { 0x8b2000174876e800, 0x8c80000000000001, 1, 0x00000000}, //
test95:-100000000000x10^89 EQUAL -1x10^100 { 0x8b0000e8d4a51000, 0x8c80000000000001, 1, 0x00000000}, //
test96:-1000000000000x10^88 EQUAL -1x10^100 { 0x8ae009184e72a000, 0x8c80000000000001, 1, 0x00000000}, //
test97:-10000000000000x10^87 EQUAL -1x10^100 { 0x8ac05af3107a4000, 0x8c80000000000001, 1, 0x00000000}, //
test98:-100000000000000x10^86 EQUAL -1x10^100 { 0x8aa38d7ea4c68000, 0x8c80000000000001, 1, 0x00000000}, // test99:
-1000000000000000x10^85 EQUAL -1x10^100 { 0x8aa38d7ea4c68000, 0x8c200000000003e8, 1, 0x00000000}, //
test100:-1000000000000000x10^85 EQUAL -1000x10^97 { 0xe28b86f26fc10000, 0x8c200000000003e8, 0, 0x00000000}, //
test101:-10000000000000000x10^84(non-canonical)=0 NOTEQUAL -1000x10^97 { 0xe28b86f26fc10000, 0x8000000000000000, 1, 0x00000000}, //
test102:-10000000000000000x10^84(non-canonical)=0 EQUAL 0 { 0xe28b86f26fc10000, 0x0000000000000000, 1, 0x00000000}, //
test103:-10000000000000000x10^84(non-canonical)=0 EQUAL 0 { 0x60f386f26fc0ffff, 0x607b86f26fc0ffff, 0, 0x00000000}, // test104:
9999999999999999x10^30 GREATER than 9999999999999999x10^15 { 0x60f386f26fc0fffb, 0x607b86f26fc0fffc, 0, 0x00000000}, // test105:
9999999999999995x10^30 GREATER than 9999999999999996x10^15 { 0x60f386f26fc0fffc, 0x607b86f26fc0fffb, 0, 0x00000000}, // test106:
9999999999999996x10^30 GREATER than 9999999999999995x10^15 { 0x607b86f26fc0ffff, 0x60f386f26fc0ffff, 0, 0x00000000}, // test107:
9999999999999999x10^15 LESSTHAN than 9999999999999999x10^30 { 0x607b86f26fc0fffc, 0x60f386f26fc0fffb, 0, 0x00000000}, // test108:
9999999999999996x10^15 LESSTHAN than 9999999999999995x10^30 { 0xe07b86f26fc0fffb, 0x60f386f26fc0fffc, 0, 0x00000000}, // test109:
9999999999999995x10^15 LESSTHAN than 9999999999999996x10^30 { 0xe0f386f26fc0ffff, 0xe07b86f26fc0ffff, 0, 0x00000000}, //
test110:-9999999999999999x10^30 LESSTHAN than-9999999999999999x10^15 { 0xe0f386f26fc0fffb, 0xe07b86f26fc0fffc, 0, 0x00000000}, //
test111:-9999999999999995x10^30 LESSTHAN than-9999999999999996x10^15 { 0xe0f386f26fc0fffc, 0xe07b86f26fc0fffb, 0, 0x00000000}, //
test112:-9999999999999996x10^30 LESSTHAN than-9999999999999995x10^15 { 0xe07b86f26fc0ffff, 0xe0f386f26fc0ffff, 0, 0x00000000}, //
test113:-9999999999999999x10^15 GREATER than-9999999999999999x10^30 { 0xe07b86f26fc0fffc, 0xe0f386f26fc0fffb, 0, 0x00000000}, //
test114:-9999999999999996x10^15 GREATER than-9999999999999995x10^30 { 0xe07b86f26fc0fffb, 0xe0f386f26fc0fffc, 0, 0x00000000}, //
test115:-9999999999999995x10^15 GREATER than-9999999999999996x10^30 { 0x84000000003d03bd, 0x84000000003d03be, 0, 0x00000000}, //
test116:-3998653x10^32 GREATERTHAN -39986544x10^32 { 0x04000000003d03bd, 0x04000000003d03be, 0, 0x00000000}, //
test117:+3998653x10^32 LESSTHAN +39986544x10^32 { 0x04000000003d03be, 0x04000000003d03bd, 0, 0x00000000}, //
test118:+3998654x10^32 GREATERTHAN +39986543x10^32 { 0x84000000003d03be, 0x84000000003d03bd, 0, 0x00000000}, //
test119:-3998654x10^32 LESSTHAN -39986543x10^32 { 0x8000000000000000, 0xfe00000000000000, 0, 0x00000001}, //
test120:-zero UNORDERED -sNAN (invalid exception) { 0xfe00000000000000, 0xfe00000000000000, 0, 0x00000001}, //
test121:-sNAN UNORDERED -sNAN (invalid exception) { 0xfe00000000000000, 0xfe00000000000000, 0, 0x00000001}, //
test122:-sNAN UNORDERED -INFINITY(invalid exception) { 0x8000000000000000, 0x7e00000000000000, 0, 0x00000001}, //
test123:-zero UNORDERED sNAN (invalid exception) { 0xfe00000000000000, 0x7e00000000000000, 0, 0x00000001}, //
test124:-sNAN UNORDERED sNAN (invalid exception) { 0xfe00000000000000, 0x7e00000000000000, 0, 0x00000001}, //
test125:-sNAN UNORDERED INFINITY(invalid exception) { 0x8000000000000000, 0x7e00000000000000, 0, 0x00000001}, //
test126:negative zero NOTEQUAL sNAN(invalid exception) { 0x0000000000000000, 0x7e00000000000000, 0, 0x00000001}, //
test127:zero NOTEQUAL sNAN (invalid exception) { 0x7e00000000000000, 0x7e00000000000000, 0, 0x00000001}, // test128:sNAN
NOTEQUAL sNAN (invalid exception) { 0x7e00000000000000, 0x7e00000000000000, 0, 0x00000001}, //
test129:sNAN NOTEQUAL INFINITY(invalid exception) };. |
Attachment:
testcases_128bit_comparison.txt
Description: testcases_128bit_comparison.txt
Attachment:
testcases_64bit_comparison.txt
Description: testcases_64bit_comparison.txt