1 /* Check reciprocal estimate functions for accuracy. */
4 typedef unsigned long uns64_t
;
5 #define UNUM64(x) x ## L
8 typedef unsigned long long uns64_t
;
9 #define UNUM64(x) x ## LL
12 typedef unsigned int uns32_t
;
15 #define TNAME(x) TNAME2(x)
22 #define NAME(PREFIX) PREFIX ## _float
23 #define UNS_TYPE uns32_t
24 #define UNS_ABS __builtin_abs
27 #define FABS __builtin_fabsf
28 #define FMAX __builtin_fmaxf
29 #define FMIN __builtin_fminf
30 #define SQRT __builtin_sqrtf
35 #define ASMDIV "fdivs"
36 #define ASMSQRT "fsqrts"
40 { 0x4fffffff }, /* 8589934080 */ \
41 { 0x4effffff }, /* 2147483520 */ \
42 { 0x40ffffff }, /* 7.99999952316284 */ \
43 { 0x3fffffff }, /* 1.99999988079071 */ \
44 { 0x417fffff }, /* 15.9999990463257 */ \
45 { 0x42ffffff }, /* 127.999992370605 */ \
46 { 0x3dffffff }, /* 0.124999992549419 */ \
47 { 0x3effffff }, /* 0.499999970197678 */ \
52 { 0x457ffffe }, /* 4096 - small amount */ \
53 { 0x4c7fffff }, /* 6.71089e+07 */ \
54 { 0x3d7fffff }, /* 0.0625 - small amount */ \
55 { 0x307ffffe }, /* 9.31322e-10 */ \
56 { 0x4c7ffffe }, /* 6.71089e+07 */ \
57 { 0x397ffffe }, /* 0.000244141 */ \
58 { 0x2e7fffff }, /* 5.82077e-11 */ \
59 { 0x2f7fffff }, /* 2.32831e-10 */ \
63 #include "recip-test2.h"
89 #define NAME(PREFIX) PREFIX ## _double
90 #define UNS_TYPE uns64_t
91 #define UNS_ABS __builtin_imaxabs
94 #define FABS __builtin_fabs
95 #define FMAX __builtin_fmax
96 #define FMIN __builtin_fmin
97 #define SQRT __builtin_sqrt
102 #define ASMDIV "fdiv"
103 #define ASMSQRT "fsqrt"
107 { UNUM64 (0x2b57be53f2a2f3a0) }, /* 6.78462e-100 */ \
108 { UNUM64 (0x2b35f8e8ea553e52) }, /* 1.56963e-100 */ \
109 { UNUM64 (0x2b5b9d861d2fe4fb) }, /* 7.89099e-100 */ \
110 { UNUM64 (0x2b45dc44a084e682) }, /* 3.12327e-100 */ \
111 { UNUM64 (0x2b424ce16945d777) }, /* 2.61463e-100 */ \
112 { UNUM64 (0x2b20b5023d496b50) }, /* 5.96749e-101 */ \
113 { UNUM64 (0x2b61170547f57caa) }, /* 9.76678e-100 */ \
114 { UNUM64 (0x2b543b9d498aac37) }, /* 5.78148e-100 */ \
119 { UNUM64 (0x2b616f2d8cbbc646) }, /* 9.96359e-100 */ \
120 { UNUM64 (0x2b5c4db2da0a011d) }, /* 8.08764e-100 */ \
121 { UNUM64 (0x2b55a82d5735b262) }, /* 6.1884e-100 */ \
122 { UNUM64 (0x2b50b52908258cb8) }, /* 4.77416e-100 */ \
123 { UNUM64 (0x2b363989a4fb29af) }, /* 1.58766e-100 */ \
124 { UNUM64 (0x2b508b9f6f4180a9) }, /* 4.7278e-100 */ \
125 { UNUM64 (0x2b4f7a1d48accb40) }, /* 4.49723e-100 */ \
126 { UNUM64 (0x2b1146a37372a81f) }, /* 3.08534e-101 */ \
127 { UNUM64 (0x2b33f876a8c48050) }, /* 1.42663e-100 */ \
130 #include "recip-test2.h"
133 main (int argc
__attribute__((__unused__
)),
134 char *argv
[] __attribute__((__unused__
)))
145 if (error_count_float
!= 0 || error_count_double
!= 0)