1 /*
2  * SPDX-License-Identifier: BSD-3-Clause
3  *
4  * Copyright © 2020 Keith Packard
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above
14  *    copyright notice, this list of conditions and the following
15  *    disclaimer in the documentation and/or other materials provided
16  *    with the distribution.
17  *
18  * 3. Neither the name of the copyright holder nor the names of its
19  *    contributors may be used to endorse or promote products derived
20  *    from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26  * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
27  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
29  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
31  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
33  * OF THE POSSIBILITY OF SUCH DAMAGE.
34  */
35 
36 #define makelname(s) scat(s,l)
37 
38 volatile const FLOAT_T makemathname(zero) = (FLOAT_T) 0.0;
39 volatile const FLOAT_T makemathname(negzero) = (FLOAT_T) -0.0;
40 volatile const FLOAT_T makemathname(one) = (FLOAT_T) 1.0;
41 volatile const FLOAT_T makemathname(two) = (FLOAT_T) 2.0;
42 volatile const FLOAT_T makemathname(three) = (FLOAT_T) 3.0;
43 volatile const FLOAT_T makemathname(half) = (FLOAT_T) 0.5;
44 volatile const FLOAT_T makemathname(big) = BIG;
45 volatile const FLOAT_T makemathname(bigodd) = BIGODD;
46 volatile const FLOAT_T makemathname(bigeven) = BIGEVEN;
47 volatile const FLOAT_T makemathname(small) = SMALL;
48 volatile const FLOAT_T makemathname(infval) = (FLOAT_T) INFINITY;
49 volatile const FLOAT_T makemathname(minfval) = (FLOAT_T) -INFINITY;
50 volatile const FLOAT_T makemathname(qnanval) = (FLOAT_T) NAN;
51 volatile const FLOAT_T makemathname(snanval) = (FLOAT_T) sNAN;
52 volatile const FLOAT_T makemathname(pio2) = (FLOAT_T) (PI_VAL/(FLOAT_T)2.0);
53 volatile const FLOAT_T makemathname(min_val) = (FLOAT_T) MIN_VAL;
54 volatile const FLOAT_T makemathname(max_val) = (FLOAT_T) MAX_VAL;
55 #define FLOAT_LONG_MASK (~0UL << ((sizeof (long) * 8 <= MANT_DIG) ? 0 : (sizeof (long) * 8 - MANT_DIG - 1)))
56 #define FLOAT_LONG_MIN (long) (LONG_MIN & FLOAT_LONG_MASK)
57 #define FLOAT_LONG_MAX (long) (LONG_MAX & FLOAT_LONG_MASK)
58 volatile const FLOAT_T makemathname(long_min_mask) = (FLOAT_T) FLOAT_LONG_MIN;
59 volatile const FLOAT_T makemathname(long_max_mask) = (FLOAT_T) FLOAT_LONG_MAX;
60 volatile const FLOAT_T makemathname(long_min_one) = (FLOAT_T) ((FLOAT_T) LONG_MIN - (FLOAT_T) (~FLOAT_LONG_MASK + 1) * 2);
61 volatile const FLOAT_T makemathname(long_max_one) = (FLOAT_T) ((FLOAT_T) LONG_MAX + (FLOAT_T) (~FLOAT_LONG_MASK + 1));
62 
63 #define FLOAT_LONG_LONG_MASK (~0ULL << ((sizeof (long long) * 8 <= MANT_DIG) ? 0 : (sizeof (long long) * 8 - MANT_DIG - 1)))
64 #define FLOAT_LONG_LONG_MIN (long long) (LLONG_MIN & FLOAT_LONG_LONG_MASK)
65 #define FLOAT_LONG_LONG_MAX (long long) (LLONG_MAX & FLOAT_LONG_LONG_MASK)
66 volatile const FLOAT_T makemathname(long_long_min_mask) = (FLOAT_T) FLOAT_LONG_LONG_MIN;
67 volatile const FLOAT_T makemathname(long_long_max_mask) = (FLOAT_T) FLOAT_LONG_LONG_MAX;
68 volatile const FLOAT_T makemathname(long_long_min_one) = (FLOAT_T) ((FLOAT_T) LLONG_MIN - (FLOAT_T) (~FLOAT_LONG_LONG_MASK + 1) * 2);
69 volatile const FLOAT_T makemathname(long_long_max_one) = (FLOAT_T) ((FLOAT_T) LLONG_MAX + (FLOAT_T) (~FLOAT_LONG_LONG_MASK + 1));
70 
71 #ifdef __PICOLIBC__
72 #define LROUND_LONG_MAX LONG_MAX
73 #define LROUND_LLONG_MAX LLONG_MAX
74 #else
75 #define LROUND_LONG_MAX LONG_MIN
76 #define LROUND_LLONG_MAX LLONG_MIN
77 #endif
78 
79 FLOAT_T makemathname(scalb)(FLOAT_T, FLOAT_T);
80 
81 #define cat2(a,b) a ## b
82 #define str(a) #a
83 #define TEST(n,v,ex,er)	{ .func = makemathname(cat2(test_, n)), .name = str(n), .value = (v), .except = (ex), .errno_expect = (er) }
84 
85 static int _signgam;
86 
87 #ifndef SIMPLE_MATH_ONLY
makemathname(test_acos_2)88 FLOAT_T makemathname(test_acos_2)(void) { return makemathname(acos)(makemathname(two)); }
makemathname(test_acos_qnan)89 FLOAT_T makemathname(test_acos_qnan)(void) { return makemathname(acos)(makemathname(qnanval)); }
makemathname(test_acos_snan)90 FLOAT_T makemathname(test_acos_snan)(void) { return makemathname(acos)(makemathname(snanval)); }
makemathname(test_acos_inf)91 FLOAT_T makemathname(test_acos_inf)(void) { return makemathname(acos)(makemathname(infval)); }
makemathname(test_acos_minf)92 FLOAT_T makemathname(test_acos_minf)(void) { return makemathname(acos)(makemathname(minfval)); }
93 
makemathname(test_acosh_half)94 FLOAT_T makemathname(test_acosh_half)(void) { return makemathname(acosh)(makemathname(one)/makemathname(two)); }
makemathname(test_acosh_qnan)95 FLOAT_T makemathname(test_acosh_qnan)(void) { return makemathname(acosh)(makemathname(qnanval)); }
makemathname(test_acosh_snan)96 FLOAT_T makemathname(test_acosh_snan)(void) { return makemathname(acosh)(makemathname(snanval)); }
makemathname(test_acosh_inf)97 FLOAT_T makemathname(test_acosh_inf)(void) { return makemathname(acosh)(makemathname(infval)); }
makemathname(test_acosh_minf)98 FLOAT_T makemathname(test_acosh_minf)(void) { return makemathname(acosh)(makemathname(minfval)); }
99 
makemathname(test_asin_2)100 FLOAT_T makemathname(test_asin_2)(void) { return makemathname(asin)(makemathname(two)); }
makemathname(test_asin_qnan)101 FLOAT_T makemathname(test_asin_qnan)(void) { return makemathname(asin)(makemathname(qnanval)); }
makemathname(test_asin_snan)102 FLOAT_T makemathname(test_asin_snan)(void) { return makemathname(asin)(makemathname(snanval)); }
makemathname(test_asin_inf)103 FLOAT_T makemathname(test_asin_inf)(void) { return makemathname(asin)(makemathname(infval)); }
makemathname(test_asin_minf)104 FLOAT_T makemathname(test_asin_minf)(void) { return makemathname(asin)(makemathname(minfval)); }
105 
makemathname(test_asinh_0)106 FLOAT_T makemathname(test_asinh_0)(void) { return makemathname(asinh)(makemathname(zero)); }
makemathname(test_asinh_neg0)107 FLOAT_T makemathname(test_asinh_neg0)(void) { return makemathname(asinh)(makemathname(negzero)); }
makemathname(test_asinh_qnan)108 FLOAT_T makemathname(test_asinh_qnan)(void) { return makemathname(asinh)(makemathname(qnanval)); }
makemathname(test_asinh_snan)109 FLOAT_T makemathname(test_asinh_snan)(void) { return makemathname(asinh)(makemathname(snanval)); }
makemathname(test_asinh_inf)110 FLOAT_T makemathname(test_asinh_inf)(void) { return makemathname(asinh)(makemathname(infval)); }
makemathname(test_asinh_minf)111 FLOAT_T makemathname(test_asinh_minf)(void) { return makemathname(asinh)(makemathname(minfval)); }
112 
makemathname(test_atan2_qnanx)113 FLOAT_T makemathname(test_atan2_qnanx)(void) { return makemathname(atan2)(makemathname(one), makemathname(qnanval)); }
makemathname(test_atan2_qnany)114 FLOAT_T makemathname(test_atan2_qnany)(void) { return makemathname(atan2)(makemathname(qnanval), makemathname(one)); }
makemathname(test_atan2_snanx)115 FLOAT_T makemathname(test_atan2_snanx)(void) { return makemathname(atan2)(makemathname(one), makemathname(snanval)); }
makemathname(test_atan2_snany)116 FLOAT_T makemathname(test_atan2_snany)(void) { return makemathname(atan2)(makemathname(snanval), makemathname(one)); }
makemathname(test_atan2_tiny)117 FLOAT_T makemathname(test_atan2_tiny)(void) { return makemathname(atan2)(makemathname(min_val), makemathname(max_val)); }
makemathname(test_atan2_nottiny)118 FLOAT_T makemathname(test_atan2_nottiny)(void) { return makemathname(atan2)(makemathname(min_val), (FLOAT_T) -0x8p-20); }
119 
makemathname(test_atanh_qnan)120 FLOAT_T makemathname(test_atanh_qnan)(void) { return makemathname(atanh)(makemathname(qnanval)); }
makemathname(test_atanh_snan)121 FLOAT_T makemathname(test_atanh_snan)(void) { return makemathname(atanh)(makemathname(snanval)); }
makemathname(test_atanh_1)122 FLOAT_T makemathname(test_atanh_1)(void) { return makemathname(atanh)(makemathname(one)); }
makemathname(test_atanh_neg1)123 FLOAT_T makemathname(test_atanh_neg1)(void) { return makemathname(atanh)(-makemathname(one)); }
makemathname(test_atanh_2)124 FLOAT_T makemathname(test_atanh_2)(void) { return makemathname(atanh)(makemathname(two)); }
makemathname(test_atanh_neg2)125 FLOAT_T makemathname(test_atanh_neg2)(void) { return makemathname(atanh)(-makemathname(two)); }
126 
makemathname(test_cbrt_0)127 FLOAT_T makemathname(test_cbrt_0)(void) { return makemathname(cbrt)(makemathname(zero)); }
makemathname(test_cbrt_neg0)128 FLOAT_T makemathname(test_cbrt_neg0)(void) { return makemathname(cbrt)(-makemathname(zero)); }
makemathname(test_cbrt_inf)129 FLOAT_T makemathname(test_cbrt_inf)(void) { return makemathname(cbrt)(makemathname(infval)); }
makemathname(test_cbrt_neginf)130 FLOAT_T makemathname(test_cbrt_neginf)(void) { return makemathname(cbrt)(-makemathname(infval)); }
makemathname(test_cbrt_qnan)131 FLOAT_T makemathname(test_cbrt_qnan)(void) { return makemathname(cbrt)(makemathname(qnanval)); }
makemathname(test_cbrt_snan)132 FLOAT_T makemathname(test_cbrt_snan)(void) { return makemathname(cbrt)(makemathname(snanval)); }
133 
makemathname(test_cos_inf)134 FLOAT_T makemathname(test_cos_inf)(void) { return makemathname(cos)(makemathname(infval)); }
makemathname(test_cos_qnan)135 FLOAT_T makemathname(test_cos_qnan)(void) { return makemathname(cos)(makemathname(qnanval)); }
makemathname(test_cos_snan)136 FLOAT_T makemathname(test_cos_snan)(void) { return makemathname(cos)(makemathname(snanval)); }
makemathname(test_cos_0)137 FLOAT_T makemathname(test_cos_0)(void) { return makemathname(cos)(makemathname(zero)); }
138 
makemathname(test_cosh_big)139 FLOAT_T makemathname(test_cosh_big)(void) { return makemathname(cosh)(makemathname(big)); }
makemathname(test_cosh_negbig)140 FLOAT_T makemathname(test_cosh_negbig)(void) { return makemathname(cosh)(makemathname(big)); }
makemathname(test_cosh_inf)141 FLOAT_T makemathname(test_cosh_inf)(void) { return makemathname(cosh)(makemathname(infval)); }
makemathname(test_cosh_qnan)142 FLOAT_T makemathname(test_cosh_qnan)(void) { return makemathname(cosh)(makemathname(qnanval)); }
makemathname(test_cosh_snan)143 FLOAT_T makemathname(test_cosh_snan)(void) { return makemathname(cosh)(makemathname(snanval)); }
144 
makemathname(test_drem_0)145 FLOAT_T makemathname(test_drem_0)(void) { return makemathname(drem)(makemathname(two), makemathname(zero)); }
makemathname(test_drem_qnan_1)146 FLOAT_T makemathname(test_drem_qnan_1)(void) { return makemathname(drem)(makemathname(qnanval), makemathname(one)); }
makemathname(test_drem_1_qnan)147 FLOAT_T makemathname(test_drem_1_qnan)(void) { return makemathname(drem)(makemathname(one), makemathname(qnanval)); }
makemathname(test_drem_snan_1)148 FLOAT_T makemathname(test_drem_snan_1)(void) { return makemathname(drem)(makemathname(snanval), makemathname(one)); }
makemathname(test_drem_1_snan)149 FLOAT_T makemathname(test_drem_1_snan)(void) { return makemathname(drem)(makemathname(one), makemathname(snanval)); }
makemathname(test_drem_inf_2)150 FLOAT_T makemathname(test_drem_inf_2)(void) { return makemathname(drem)(makemathname(infval), makemathname(two)); }
makemathname(test_drem_inf_0)151 FLOAT_T makemathname(test_drem_inf_0)(void) { return makemathname(drem)(makemathname(infval), makemathname(zero)); }
makemathname(test_drem_2_0)152 FLOAT_T makemathname(test_drem_2_0)(void) { return makemathname(drem)(makemathname(two), makemathname(zero)); }
makemathname(test_drem_1_2)153 FLOAT_T makemathname(test_drem_1_2)(void) { return makemathname(drem)(makemathname(one), makemathname(two)); }
makemathname(test_drem_neg1_2)154 FLOAT_T makemathname(test_drem_neg1_2)(void) { return makemathname(drem)(-makemathname(one), makemathname(two)); }
155 
makemathname(test_erf_qnan)156 FLOAT_T makemathname(test_erf_qnan)(void) { return makemathname(erf)(makemathname(qnanval)); }
makemathname(test_erf_snan)157 FLOAT_T makemathname(test_erf_snan)(void) { return makemathname(erf)(makemathname(snanval)); }
makemathname(test_erf_0)158 FLOAT_T makemathname(test_erf_0)(void) { return makemathname(erf)(makemathname(zero)); }
makemathname(test_erf_neg0)159 FLOAT_T makemathname(test_erf_neg0)(void) { return makemathname(erf)(-makemathname(zero)); }
makemathname(test_erf_inf)160 FLOAT_T makemathname(test_erf_inf)(void) { return makemathname(erf)(makemathname(infval)); }
makemathname(test_erf_neginf)161 FLOAT_T makemathname(test_erf_neginf)(void) { return makemathname(erf)(-makemathname(infval)); }
makemathname(test_erf_small)162 FLOAT_T makemathname(test_erf_small)(void) { return makemathname(erf)(makemathname(small)); }
163 
makemathname(test_exp_qnan)164 FLOAT_T makemathname(test_exp_qnan)(void) { return makemathname(exp)(makemathname(qnanval)); }
makemathname(test_exp_snan)165 FLOAT_T makemathname(test_exp_snan)(void) { return makemathname(exp)(makemathname(snanval)); }
makemathname(test_exp_inf)166 FLOAT_T makemathname(test_exp_inf)(void) { return makemathname(exp)(makemathname(infval)); }
makemathname(test_exp_neginf)167 FLOAT_T makemathname(test_exp_neginf)(void) { return makemathname(exp)(-makemathname(infval)); }
makemathname(test_exp_big)168 FLOAT_T makemathname(test_exp_big)(void) { return makemathname(exp)(makemathname(big)); }
makemathname(test_exp_negbig)169 FLOAT_T makemathname(test_exp_negbig)(void) { return makemathname(exp)(-makemathname(big)); }
170 
makemathname(test_exp2_qnan)171 FLOAT_T makemathname(test_exp2_qnan)(void) { return makemathname(exp2)(makemathname(qnanval)); }
makemathname(test_exp2_snan)172 FLOAT_T makemathname(test_exp2_snan)(void) { return makemathname(exp2)(makemathname(snanval)); }
makemathname(test_exp2_inf)173 FLOAT_T makemathname(test_exp2_inf)(void) { return makemathname(exp2)(makemathname(infval)); }
makemathname(test_exp2_neginf)174 FLOAT_T makemathname(test_exp2_neginf)(void) { return makemathname(exp2)(-makemathname(infval)); }
makemathname(test_exp2_big)175 FLOAT_T makemathname(test_exp2_big)(void) { return makemathname(exp2)(makemathname(big)); }
makemathname(test_exp2_negbig)176 FLOAT_T makemathname(test_exp2_negbig)(void) { return makemathname(exp2)(-makemathname(big)); }
177 
makemathname(test_exp10_qnan)178 FLOAT_T makemathname(test_exp10_qnan)(void) { return makemathname(exp10)(makemathname(qnanval)); }
makemathname(test_exp10_snan)179 FLOAT_T makemathname(test_exp10_snan)(void) { return makemathname(exp10)(makemathname(snanval)); }
makemathname(test_exp10_inf)180 FLOAT_T makemathname(test_exp10_inf)(void) { return makemathname(exp10)(makemathname(infval)); }
makemathname(test_exp10_neginf)181 FLOAT_T makemathname(test_exp10_neginf)(void) { return makemathname(exp10)(-makemathname(infval)); }
makemathname(test_exp10_big)182 FLOAT_T makemathname(test_exp10_big)(void) { return makemathname(exp10)(makemathname(big)); }
makemathname(test_exp10_negbig)183 FLOAT_T makemathname(test_exp10_negbig)(void) { return makemathname(exp10)(-makemathname(big)); }
184 
makemathname(test_expm1_qnan)185 FLOAT_T makemathname(test_expm1_qnan)(void) { return makemathname(expm1)(makemathname(qnanval)); }
makemathname(test_expm1_snan)186 FLOAT_T makemathname(test_expm1_snan)(void) { return makemathname(expm1)(makemathname(snanval)); }
makemathname(test_expm1_0)187 FLOAT_T makemathname(test_expm1_0)(void) { return makemathname(expm1)(makemathname(zero)); }
makemathname(test_expm1_neg0)188 FLOAT_T makemathname(test_expm1_neg0)(void) { return makemathname(expm1)(-makemathname(zero)); }
makemathname(test_expm1_inf)189 FLOAT_T makemathname(test_expm1_inf)(void) { return makemathname(expm1)(makemathname(infval)); }
makemathname(test_expm1_neginf)190 FLOAT_T makemathname(test_expm1_neginf)(void) { return makemathname(expm1)(-makemathname(infval)); }
makemathname(test_expm1_big)191 FLOAT_T makemathname(test_expm1_big)(void) { return makemathname(expm1)(makemathname(big)); }
makemathname(test_expm1_negbig)192 FLOAT_T makemathname(test_expm1_negbig)(void) { return makemathname(expm1)(-makemathname(big)); }
193 
194 #endif /* SIMPLE_MATH_ONLY */
195 
makemathname(test_fabs_qnan)196 FLOAT_T makemathname(test_fabs_qnan)(void) { return makemathname(fabs)(makemathname(qnanval)); }
makemathname(test_fabs_snan)197 FLOAT_T makemathname(test_fabs_snan)(void) { return makemathname(fabs)(makemathname(snanval)); }
makemathname(test_fabs_0)198 FLOAT_T makemathname(test_fabs_0)(void) { return makemathname(fabs)(makemathname(zero)); }
makemathname(test_fabs_neg0)199 FLOAT_T makemathname(test_fabs_neg0)(void) { return makemathname(fabs)(-makemathname(zero)); }
makemathname(test_fabs_inf)200 FLOAT_T makemathname(test_fabs_inf)(void) { return makemathname(fabs)(makemathname(infval)); }
makemathname(test_fabs_neginf)201 FLOAT_T makemathname(test_fabs_neginf)(void) { return makemathname(fabs)(-makemathname(infval)); }
202 
203 #ifndef SIMPLE_MATH_ONLY
204 
makemathname(test_fdim_qnan_1)205 FLOAT_T makemathname(test_fdim_qnan_1)(void) { return makemathname(fdim)(makemathname(qnanval), makemathname(one)); }
makemathname(test_fdim_1_qnan)206 FLOAT_T makemathname(test_fdim_1_qnan)(void) { return makemathname(fdim)(makemathname(one), makemathname(qnanval)); }
makemathname(test_fdim_snan_1)207 FLOAT_T makemathname(test_fdim_snan_1)(void) { return makemathname(fdim)(makemathname(snanval), makemathname(one)); }
makemathname(test_fdim_1_snan)208 FLOAT_T makemathname(test_fdim_1_snan)(void) { return makemathname(fdim)(makemathname(one), makemathname(snanval)); }
makemathname(test_fdim_inf_1)209 FLOAT_T makemathname(test_fdim_inf_1)(void) { return makemathname(fdim)(makemathname(infval), makemathname(one)); }
makemathname(test_fdim_1_inf)210 FLOAT_T makemathname(test_fdim_1_inf)(void) { return makemathname(fdim)(makemathname(one), makemathname(infval)); }
makemathname(test_fdim_big_negbig)211 FLOAT_T makemathname(test_fdim_big_negbig)(void) { return makemathname(fdim)(makemathname(big), -makemathname(big)); }
212 
213 #endif
214 
makemathname(test_floor_1)215 FLOAT_T makemathname(test_floor_1)(void) { return makemathname(floor)(makemathname(one)); }
makemathname(test_floor_0)216 FLOAT_T makemathname(test_floor_0)(void) { return makemathname(floor)(makemathname(zero)); }
makemathname(test_floor_neg0)217 FLOAT_T makemathname(test_floor_neg0)(void) { return makemathname(floor)(-makemathname(zero)); }
makemathname(test_floor_qnan)218 FLOAT_T makemathname(test_floor_qnan)(void) { return makemathname(floor)(makemathname(qnanval)); }
makemathname(test_floor_snan)219 FLOAT_T makemathname(test_floor_snan)(void) { return makemathname(floor)(makemathname(snanval)); }
makemathname(test_floor_inf)220 FLOAT_T makemathname(test_floor_inf)(void) { return makemathname(floor)(makemathname(infval)); }
makemathname(test_floor_neginf)221 FLOAT_T makemathname(test_floor_neginf)(void) { return makemathname(floor)(-makemathname(infval)); }
222 
223 #ifndef SIMPLE_MATH_ONLY
224 
makemathname(test_fma_big_big_1)225 FLOAT_T makemathname(test_fma_big_big_1)(void) { return makemathname(fma)(makemathname(big), makemathname(big), makemathname(one)); }
makemathname(test_fma_big_negbig_1)226 FLOAT_T makemathname(test_fma_big_negbig_1)(void) { return makemathname(fma)(makemathname(big), -makemathname(big), makemathname(one)); }
makemathname(test_fma_small_small_1)227 FLOAT_T makemathname(test_fma_small_small_1)(void) { return makemathname(fma)(makemathname(small), makemathname(small), makemathname(one)); }
makemathname(test_fma_small_negsmall_1)228 FLOAT_T makemathname(test_fma_small_negsmall_1)(void) { return makemathname(fma)(makemathname(small), -makemathname(small), makemathname(one)); }
makemathname(test_fma_small_small_0)229 FLOAT_T makemathname(test_fma_small_small_0)(void) { return makemathname(fma)(makemathname(small), makemathname(small), makemathname(zero)); }
makemathname(test_fma_small_negsmall_0)230 FLOAT_T makemathname(test_fma_small_negsmall_0)(void) { return makemathname(fma)(makemathname(small), -makemathname(small), makemathname(zero)); }
makemathname(test_fma_qnan_1_1)231 FLOAT_T makemathname(test_fma_qnan_1_1)(void) { return makemathname(fma)(makemathname(qnanval), makemathname(one), makemathname(one)); }
makemathname(test_fma_1_qnan_1)232 FLOAT_T makemathname(test_fma_1_qnan_1)(void) { return makemathname(fma)(makemathname(one), makemathname(qnanval), makemathname(one)); }
makemathname(test_fma_1_1_qnan)233 FLOAT_T makemathname(test_fma_1_1_qnan)(void) { return makemathname(fma)(makemathname(one), makemathname(one), makemathname(qnanval)); }
makemathname(test_fma_snan_1_1)234 FLOAT_T makemathname(test_fma_snan_1_1)(void) { return makemathname(fma)(makemathname(snanval), makemathname(one), makemathname(one)); }
makemathname(test_fma_1_snan_1)235 FLOAT_T makemathname(test_fma_1_snan_1)(void) { return makemathname(fma)(makemathname(one), makemathname(snanval), makemathname(one)); }
makemathname(test_fma_1_1_snan)236 FLOAT_T makemathname(test_fma_1_1_snan)(void) { return makemathname(fma)(makemathname(one), makemathname(one), makemathname(snanval)); }
makemathname(test_fma_inf_1_neginf)237 FLOAT_T makemathname(test_fma_inf_1_neginf)(void) { return makemathname(fma)(makemathname(infval), makemathname(one), -makemathname(infval)); }
makemathname(test_fma_1_inf_neginf)238 FLOAT_T makemathname(test_fma_1_inf_neginf)(void) { return makemathname(fma)(makemathname(one), makemathname(infval), -makemathname(infval)); }
makemathname(test_fma_neginf_1_inf)239 FLOAT_T makemathname(test_fma_neginf_1_inf)(void) { return makemathname(fma)(makemathname(one), -makemathname(infval), makemathname(infval)); }
makemathname(test_fma_1_neginf_inf)240 FLOAT_T makemathname(test_fma_1_neginf_inf)(void) { return makemathname(fma)(-makemathname(infval), makemathname(one), makemathname(infval)); }
makemathname(test_fma_inf_0_1)241 FLOAT_T makemathname(test_fma_inf_0_1)(void) { return makemathname(fma)(makemathname(infval), makemathname(zero), makemathname(one)); }
makemathname(test_fma_0_inf_1)242 FLOAT_T makemathname(test_fma_0_inf_1)(void) { return makemathname(fma)(makemathname(zero), makemathname(infval), makemathname(one)); }
makemathname(test_fma_inf_0_qnan)243 FLOAT_T makemathname(test_fma_inf_0_qnan)(void) { return makemathname(fma)(makemathname(infval), makemathname(zero), makemathname(qnanval)); }
makemathname(test_fma_0_inf_qnan)244 FLOAT_T makemathname(test_fma_0_inf_qnan)(void) { return makemathname(fma)(makemathname(zero), makemathname(infval), makemathname(qnanval)); }
makemathname(test_fma_inf_0_snan)245 FLOAT_T makemathname(test_fma_inf_0_snan)(void) { return makemathname(fma)(makemathname(infval), makemathname(zero), makemathname(snanval)); }
makemathname(test_fma_0_inf_snan)246 FLOAT_T makemathname(test_fma_0_inf_snan)(void) { return makemathname(fma)(makemathname(zero), makemathname(infval), makemathname(snanval)); }
247 
248 #endif
249 
makemathname(test_fmax_qnan_qnan)250 FLOAT_T makemathname(test_fmax_qnan_qnan)(void) { return makemathname(fmax)(makemathname(qnanval), makemathname(qnanval)); }
makemathname(test_fmax_qnan_1)251 FLOAT_T makemathname(test_fmax_qnan_1)(void) { return makemathname(fmax)(makemathname(qnanval), makemathname(one)); }
makemathname(test_fmax_1_qnan)252 FLOAT_T makemathname(test_fmax_1_qnan)(void) { return makemathname(fmax)(makemathname(one), makemathname(qnanval)); }
makemathname(test_fmax_snan_snan)253 FLOAT_T makemathname(test_fmax_snan_snan)(void) { return makemathname(fmax)(makemathname(snanval), makemathname(snanval)); }
makemathname(test_fmax_snan_1)254 FLOAT_T makemathname(test_fmax_snan_1)(void) { return makemathname(fmax)(makemathname(snanval), makemathname(one)); }
makemathname(test_fmax_1_snan)255 FLOAT_T makemathname(test_fmax_1_snan)(void) { return makemathname(fmax)(makemathname(one), makemathname(snanval)); }
256 
makemathname(test_fmin_qnan_qnan)257 FLOAT_T makemathname(test_fmin_qnan_qnan)(void) { return makemathname(fmin)(makemathname(qnanval), makemathname(qnanval)); }
makemathname(test_fmin_qnan_1)258 FLOAT_T makemathname(test_fmin_qnan_1)(void) { return makemathname(fmin)(makemathname(qnanval), makemathname(one)); }
makemathname(test_fmin_1_qnan)259 FLOAT_T makemathname(test_fmin_1_qnan)(void) { return makemathname(fmin)(makemathname(one), makemathname(qnanval)); }
makemathname(test_fmin_snan_snan)260 FLOAT_T makemathname(test_fmin_snan_snan)(void) { return makemathname(fmin)(makemathname(snanval), makemathname(snanval)); }
makemathname(test_fmin_snan_1)261 FLOAT_T makemathname(test_fmin_snan_1)(void) { return makemathname(fmin)(makemathname(snanval), makemathname(one)); }
makemathname(test_fmin_1_snan)262 FLOAT_T makemathname(test_fmin_1_snan)(void) { return makemathname(fmin)(makemathname(one), makemathname(snanval)); }
263 
264 #ifndef SIMPLE_MATH_ONLY
265 
makemathname(test_fmod_qnan_1)266 FLOAT_T makemathname(test_fmod_qnan_1)(void) { return makemathname(fmod)(makemathname(qnanval), makemathname(one)); }
makemathname(test_fmod_1_qnan)267 FLOAT_T makemathname(test_fmod_1_qnan)(void) { return makemathname(fmod)(makemathname(one), makemathname(qnanval)); }
makemathname(test_fmod_snan_1)268 FLOAT_T makemathname(test_fmod_snan_1)(void) { return makemathname(fmod)(makemathname(snanval), makemathname(one)); }
makemathname(test_fmod_1_snan)269 FLOAT_T makemathname(test_fmod_1_snan)(void) { return makemathname(fmod)(makemathname(one), makemathname(snanval)); }
makemathname(test_fmod_inf_1)270 FLOAT_T makemathname(test_fmod_inf_1)(void) { return makemathname(fmod)(makemathname(infval), makemathname(one)); }
makemathname(test_fmod_neginf_1)271 FLOAT_T makemathname(test_fmod_neginf_1)(void) { return makemathname(fmod)(-makemathname(infval), makemathname(one)); }
makemathname(test_fmod_1_0)272 FLOAT_T makemathname(test_fmod_1_0)(void) { return makemathname(fmod)(makemathname(one), makemathname(zero)); }
makemathname(test_fmod_0_1)273 FLOAT_T makemathname(test_fmod_0_1)(void) { return makemathname(fmod)(makemathname(zero), makemathname(one)); }
makemathname(test_fmod_neg0_1)274 FLOAT_T makemathname(test_fmod_neg0_1)(void) { return makemathname(fmod)(-makemathname(zero), makemathname(one)); }
275 
276 #endif
277 
makemathname(test_hypot_big)278 FLOAT_T makemathname(test_hypot_big)(void) { return makemathname(hypot)(makemathname(big), makemathname(big)); }
makemathname(test_hypot_1_qnan)279 FLOAT_T makemathname(test_hypot_1_qnan)(void) { return makemathname(hypot)(makemathname(one), makemathname(qnanval)); }
makemathname(test_hypot_qnan_1)280 FLOAT_T makemathname(test_hypot_qnan_1)(void) { return makemathname(hypot)(makemathname(qnanval), makemathname(one)); }
makemathname(test_hypot_inf_qnan)281 FLOAT_T makemathname(test_hypot_inf_qnan)(void) { return makemathname(hypot)(makemathname(infval), makemathname(qnanval)); }
makemathname(test_hypot_neginf_qnan)282 FLOAT_T makemathname(test_hypot_neginf_qnan)(void) { return makemathname(hypot)(-makemathname(infval), makemathname(qnanval)); }
makemathname(test_hypot_qnan_inf)283 FLOAT_T makemathname(test_hypot_qnan_inf)(void) { return makemathname(hypot)(makemathname(qnanval), makemathname(infval)); }
makemathname(test_hypot_qnan_neginf)284 FLOAT_T makemathname(test_hypot_qnan_neginf)(void) { return makemathname(hypot)(makemathname(qnanval), -makemathname(infval)); }
makemathname(test_hypot_snan_inf)285 FLOAT_T makemathname(test_hypot_snan_inf)(void) { return makemathname(hypot)(makemathname(snanval), makemathname(infval)); }
makemathname(test_hypot_snan_neginf)286 FLOAT_T makemathname(test_hypot_snan_neginf)(void) { return makemathname(hypot)(makemathname(snanval), -makemathname(infval)); }
makemathname(test_hypot_1_inf)287 FLOAT_T makemathname(test_hypot_1_inf)(void) { return makemathname(hypot)(makemathname(one), makemathname(infval)); }
makemathname(test_hypot_1_neginf)288 FLOAT_T makemathname(test_hypot_1_neginf)(void) { return makemathname(hypot)(makemathname(one), -makemathname(infval)); }
makemathname(test_hypot_inf_1)289 FLOAT_T makemathname(test_hypot_inf_1)(void) { return makemathname(hypot)(makemathname(infval), makemathname(one)); }
makemathname(test_hypot_neginf_1)290 FLOAT_T makemathname(test_hypot_neginf_1)(void) { return makemathname(hypot)(-makemathname(infval), makemathname(one)); }
291 
makemathname(test_ilogb_0)292 long long makemathname(test_ilogb_0)(void) { return makemathname(ilogb)(makemathname(zero)); }
makemathname(test_ilogb_qnan)293 long long makemathname(test_ilogb_qnan)(void) { return makemathname(ilogb)(makemathname(qnanval)); }
makemathname(test_ilogb_snan)294 long long makemathname(test_ilogb_snan)(void) { return makemathname(ilogb)(makemathname(snanval)); }
makemathname(test_ilogb_inf)295 long long makemathname(test_ilogb_inf)(void) { return makemathname(ilogb)(makemathname(infval)); }
makemathname(test_ilogb_neginf)296 long long makemathname(test_ilogb_neginf)(void) { return makemathname(ilogb)(-makemathname(infval)); }
297 
makemathname(test_fpclassify_snan)298 long long makemathname(test_fpclassify_snan)(void) { return fpclassify(makemathname(snanval)); }
makemathname(test_fpclassify_nan)299 long long makemathname(test_fpclassify_nan)(void) { return fpclassify(makemathname(qnanval)); }
makemathname(test_fpclassify_inf)300 long long makemathname(test_fpclassify_inf)(void) { return fpclassify(makemathname(infval)); }
makemathname(test_fpclassify_neginf)301 long long makemathname(test_fpclassify_neginf)(void) { return fpclassify(-makemathname(infval)); }
makemathname(test_fpclassify_zero)302 long long makemathname(test_fpclassify_zero)(void) { return fpclassify(makemathname(zero)); }
makemathname(test_fpclassify_negzero)303 long long makemathname(test_fpclassify_negzero)(void) { return fpclassify(-makemathname(zero)); }
makemathname(test_fpclassify_small)304 long long makemathname(test_fpclassify_small)(void) { return fpclassify(makemathname(small)); }
makemathname(test_fpclassify_negsmall)305 long long makemathname(test_fpclassify_negsmall)(void) { return fpclassify(-makemathname(small)); }
makemathname(test_fpclassify_two)306 long long makemathname(test_fpclassify_two)(void) { return fpclassify(makemathname(two)); }
makemathname(test_fpclassify_negtwo)307 long long makemathname(test_fpclassify_negtwo)(void) { return fpclassify(-makemathname(two)); }
308 
makemathname(test_isfinite_snan)309 long long makemathname(test_isfinite_snan)(void) { return !!isfinite(makemathname(snanval)); }
makemathname(test_isfinite_nan)310 long long makemathname(test_isfinite_nan)(void) { return !!isfinite(makemathname(qnanval)); }
makemathname(test_isfinite_inf)311 long long makemathname(test_isfinite_inf)(void) { return !!isfinite(makemathname(infval)); }
makemathname(test_isfinite_neginf)312 long long makemathname(test_isfinite_neginf)(void) { return !!isfinite(-makemathname(infval)); }
makemathname(test_isfinite_zero)313 long long makemathname(test_isfinite_zero)(void) { return !!isfinite(makemathname(zero)); }
makemathname(test_isfinite_negzero)314 long long makemathname(test_isfinite_negzero)(void) { return !!isfinite(-makemathname(zero)); }
makemathname(test_isfinite_small)315 long long makemathname(test_isfinite_small)(void) { return !!isfinite(makemathname(small)); }
makemathname(test_isfinite_negsmall)316 long long makemathname(test_isfinite_negsmall)(void) { return !!isfinite(-makemathname(small)); }
makemathname(test_isfinite_two)317 long long makemathname(test_isfinite_two)(void) { return !!isfinite(makemathname(two)); }
makemathname(test_isfinite_negtwo)318 long long makemathname(test_isfinite_negtwo)(void) { return !!isfinite(-makemathname(two)); }
319 
makemathname(test_isnormal_snan)320 long long makemathname(test_isnormal_snan)(void) { return !!isnormal(makemathname(snanval)); }
makemathname(test_isnormal_nan)321 long long makemathname(test_isnormal_nan)(void) { return !!isnormal(makemathname(qnanval)); }
makemathname(test_isnormal_inf)322 long long makemathname(test_isnormal_inf)(void) { return !!isnormal(makemathname(infval)); }
makemathname(test_isnormal_neginf)323 long long makemathname(test_isnormal_neginf)(void) { return !!isnormal(-makemathname(infval)); }
makemathname(test_isnormal_zero)324 long long makemathname(test_isnormal_zero)(void) { return !!isnormal(makemathname(zero)); }
makemathname(test_isnormal_negzero)325 long long makemathname(test_isnormal_negzero)(void) { return !!isnormal(-makemathname(zero)); }
makemathname(test_isnormal_small)326 long long makemathname(test_isnormal_small)(void) { return !!isnormal(makemathname(small)); }
makemathname(test_isnormal_negsmall)327 long long makemathname(test_isnormal_negsmall)(void) { return !!isnormal(-makemathname(small)); }
makemathname(test_isnormal_two)328 long long makemathname(test_isnormal_two)(void) { return !!isnormal(makemathname(two)); }
makemathname(test_isnormal_negtwo)329 long long makemathname(test_isnormal_negtwo)(void) { return !!isnormal(-makemathname(two)); }
330 
makemathname(test_isnan_snan)331 long long makemathname(test_isnan_snan)(void) { return !!isnan(makemathname(snanval)); }
makemathname(test_isnan_nan)332 long long makemathname(test_isnan_nan)(void) { return !!isnan(makemathname(qnanval)); }
makemathname(test_isnan_inf)333 long long makemathname(test_isnan_inf)(void) { return !!isnan(makemathname(infval)); }
makemathname(test_isnan_neginf)334 long long makemathname(test_isnan_neginf)(void) { return !!isnan(-makemathname(infval)); }
makemathname(test_isnan_zero)335 long long makemathname(test_isnan_zero)(void) { return !!isnan(makemathname(zero)); }
makemathname(test_isnan_negzero)336 long long makemathname(test_isnan_negzero)(void) { return !!isnan(-makemathname(zero)); }
makemathname(test_isnan_small)337 long long makemathname(test_isnan_small)(void) { return !!isnan(makemathname(small)); }
makemathname(test_isnan_negsmall)338 long long makemathname(test_isnan_negsmall)(void) { return !!isnan(-makemathname(small)); }
makemathname(test_isnan_two)339 long long makemathname(test_isnan_two)(void) { return !!isnan(makemathname(two)); }
makemathname(test_isnan_negtwo)340 long long makemathname(test_isnan_negtwo)(void) { return !!isnan(-makemathname(two)); }
341 
makemathname(test_isinf_snan)342 long long makemathname(test_isinf_snan)(void) { return !!isinf(makemathname(snanval)); }
makemathname(test_isinf_nan)343 long long makemathname(test_isinf_nan)(void) { return !!isinf(makemathname(qnanval)); }
makemathname(test_isinf_inf)344 long long makemathname(test_isinf_inf)(void) { return !!isinf(makemathname(infval)); }
makemathname(test_isinf_neginf)345 long long makemathname(test_isinf_neginf)(void) { return !!isinf(-makemathname(infval)); }
makemathname(test_isinf_zero)346 long long makemathname(test_isinf_zero)(void) { return !!isinf(makemathname(zero)); }
makemathname(test_isinf_negzero)347 long long makemathname(test_isinf_negzero)(void) { return !!isinf(-makemathname(zero)); }
makemathname(test_isinf_small)348 long long makemathname(test_isinf_small)(void) { return !!isinf(makemathname(small)); }
makemathname(test_isinf_negsmall)349 long long makemathname(test_isinf_negsmall)(void) { return !!isinf(-makemathname(small)); }
makemathname(test_isinf_two)350 long long makemathname(test_isinf_two)(void) { return !!isinf(makemathname(two)); }
makemathname(test_isinf_negtwo)351 long long makemathname(test_isinf_negtwo)(void) { return !!isinf(-makemathname(two)); }
352 
353 #ifndef SIMPLE_MATH_ONLY
354 
355 #ifndef NO_BESSEL_TESTS
356 
makemathname(test_j0_inf)357 FLOAT_T makemathname(test_j0_inf)(void) { return makemathname(j0)(makemathname(infval)); }
makemathname(test_j0_qnan)358 FLOAT_T makemathname(test_j0_qnan)(void) { return makemathname(j0)(makemathname(qnanval)); }
makemathname(test_j0_snan)359 FLOAT_T makemathname(test_j0_snan)(void) { return makemathname(j0)(makemathname(snanval)); }
360 
makemathname(test_j1_inf)361 FLOAT_T makemathname(test_j1_inf)(void) { return makemathname(j1)(makemathname(infval)); }
makemathname(test_j1_qnan)362 FLOAT_T makemathname(test_j1_qnan)(void) { return makemathname(j1)(makemathname(qnanval)); }
makemathname(test_j1_snan)363 FLOAT_T makemathname(test_j1_snan)(void) { return makemathname(j1)(makemathname(snanval)); }
364 
makemathname(test_jn_inf)365 FLOAT_T makemathname(test_jn_inf)(void) { return makemathname(jn)(3, makemathname(infval)); }
makemathname(test_jn_qnan)366 FLOAT_T makemathname(test_jn_qnan)(void) { return makemathname(jn)(3, makemathname(qnanval)); }
makemathname(test_jn_snan)367 FLOAT_T makemathname(test_jn_snan)(void) { return makemathname(jn)(3, makemathname(snanval)); }
368 #endif
369 
370 #endif
371 
makemathname(test_ldexp_1_0)372 FLOAT_T makemathname(test_ldexp_1_0)(void) { return makemathname(ldexp)(makemathname(one), 0); }
makemathname(test_ldexp_qnan_0)373 FLOAT_T makemathname(test_ldexp_qnan_0)(void) { return makemathname(ldexp)(makemathname(qnanval), 0); }
makemathname(test_ldexp_snan_0)374 FLOAT_T makemathname(test_ldexp_snan_0)(void) { return makemathname(ldexp)(makemathname(snanval), 0); }
makemathname(test_ldexp_inf_0)375 FLOAT_T makemathname(test_ldexp_inf_0)(void) { return makemathname(ldexp)(makemathname(infval), 0); }
makemathname(test_ldexp_neginf_0)376 FLOAT_T makemathname(test_ldexp_neginf_0)(void) { return makemathname(ldexp)(-makemathname(infval), 0); }
makemathname(test_ldexp_1_negbig)377 FLOAT_T makemathname(test_ldexp_1_negbig)(void) { return makemathname(ldexp)(makemathname(one), -(__DBL_MAX_EXP__ * 20)); }
makemathname(test_ldexp_1_big)378 FLOAT_T makemathname(test_ldexp_1_big)(void) { return makemathname(ldexp)(makemathname(one),(__DBL_MAX_EXP__ * 20)); }
379 
makemathname(test_rint_qnan)380 FLOAT_T makemathname(test_rint_qnan)(void) { return makemathname(rint)(makemathname(qnanval)); }
makemathname(test_rint_snan)381 FLOAT_T makemathname(test_rint_snan)(void) { return makemathname(rint)(makemathname(snanval)); }
makemathname(test_rint_inf)382 FLOAT_T makemathname(test_rint_inf)(void) { return makemathname(rint)(makemathname(infval)); }
makemathname(test_rint_neginf)383 FLOAT_T makemathname(test_rint_neginf)(void) { return makemathname(rint)(-makemathname(infval)); }
makemathname(test_rint_big)384 FLOAT_T makemathname(test_rint_big)(void) { return makemathname(rint)(makemathname(big)); }
makemathname(test_rint_negbig)385 FLOAT_T makemathname(test_rint_negbig)(void) { return makemathname(rint)(-makemathname(big)); }
makemathname(test_rint_half)386 FLOAT_T makemathname(test_rint_half)(void) { return makemathname(rint)(makemathname(half)); }
makemathname(test_rint_neghalf)387 FLOAT_T makemathname(test_rint_neghalf)(void) { return makemathname(rint)(makemathname(half)); }
388 
makemathname(test_nearbyint_qnan)389 FLOAT_T makemathname(test_nearbyint_qnan)(void) { return makemathname(nearbyint)(makemathname(qnanval)); }
makemathname(test_nearbyint_snan)390 FLOAT_T makemathname(test_nearbyint_snan)(void) { return makemathname(nearbyint)(makemathname(snanval)); }
makemathname(test_nearbyint_inf)391 FLOAT_T makemathname(test_nearbyint_inf)(void) { return makemathname(nearbyint)(makemathname(infval)); }
makemathname(test_nearbyint_neginf)392 FLOAT_T makemathname(test_nearbyint_neginf)(void) { return makemathname(nearbyint)(-makemathname(infval)); }
makemathname(test_nearbyint_big)393 FLOAT_T makemathname(test_nearbyint_big)(void) { return makemathname(nearbyint)(makemathname(big)); }
makemathname(test_nearbyint_negbig)394 FLOAT_T makemathname(test_nearbyint_negbig)(void) { return makemathname(nearbyint)(-makemathname(big)); }
makemathname(test_nearbyint_half)395 FLOAT_T makemathname(test_nearbyint_half)(void) { return makemathname(nearbyint)(makemathname(half)); }
makemathname(test_nearbyint_neghalf)396 FLOAT_T makemathname(test_nearbyint_neghalf)(void) { return makemathname(nearbyint)(makemathname(half)); }
397 
398 static volatile long long makemathname(llignore);
399 
makemathname(test_lrint_zero)400 long long makemathname(test_lrint_zero)(void) { return makemathname(lrint)(makemathname(zero)); }
makemathname(test_lrint_negzero)401 long long makemathname(test_lrint_negzero)(void) { return makemathname(lrint)(makemathname(negzero)); }
makemathname(test_lrint_qnan)402 long long makemathname(test_lrint_qnan)(void) { makemathname(llignore) = makemathname(lrint)(makemathname(qnanval)); return 0; }
makemathname(test_lrint_snan)403 long long makemathname(test_lrint_snan)(void) { makemathname(llignore) = makemathname(lrint)(makemathname(snanval)); return 0; }
makemathname(test_lrint_inf)404 long long makemathname(test_lrint_inf)(void) { makemathname(llignore) = makemathname(lrint)(makemathname(infval)); return 0; }
makemathname(test_lrint_neginf)405 long long makemathname(test_lrint_neginf)(void) { makemathname(llignore) = makemathname(lrint)(-makemathname(infval)); return 0; }
makemathname(test_lrint_big)406 long long makemathname(test_lrint_big)(void) { makemathname(llignore) = makemathname(lrint)(makemathname(big)); return 0; }
makemathname(test_lrint_negbig)407 long long makemathname(test_lrint_negbig)(void) { makemathname(llignore) = makemathname(lrint)(-makemathname(big)); return 0; }
makemathname(test_lrint_long_max_mask)408 long long makemathname(test_lrint_long_max_mask)(void) { return makemathname(lrint)(makemathname(long_max_mask)); }
makemathname(test_lrint_long_min_mask)409 long long makemathname(test_lrint_long_min_mask)(void) { return makemathname(lrint)(makemathname(long_min_mask)); }
makemathname(test_lrint_long_max_one)410 long long makemathname(test_lrint_long_max_one)(void) { return makemathname(lrint)(makemathname(long_max_one)); }
makemathname(test_lrint_long_min_one)411 long long makemathname(test_lrint_long_min_one)(void) { return makemathname(lrint)(makemathname(long_min_one)); }
412 
makemathname(test_llrint_qnan)413 long long makemathname(test_llrint_qnan)(void) { makemathname(llignore) = makemathname(llrint)(makemathname(qnanval)); return 0; }
makemathname(test_llrint_snan)414 long long makemathname(test_llrint_snan)(void) { makemathname(llignore) = makemathname(llrint)(makemathname(snanval)); return 0; }
makemathname(test_llrint_inf)415 long long makemathname(test_llrint_inf)(void) { makemathname(llignore) = makemathname(llrint)(makemathname(infval)); return 0; }
makemathname(test_llrint_neginf)416 long long makemathname(test_llrint_neginf)(void) { makemathname(llignore) = makemathname(llrint)(-makemathname(infval)); return 0; }
makemathname(test_llrint_big)417 long long makemathname(test_llrint_big)(void) { makemathname(llignore) = makemathname(llrint)(makemathname(big)); return 0; }
makemathname(test_llrint_negbig)418 long long makemathname(test_llrint_negbig)(void) { makemathname(llignore) = makemathname(llrint)(-makemathname(big)); return 0; }
makemathname(test_llrint_long_long_max_mask)419 long long makemathname(test_llrint_long_long_max_mask)(void) { return makemathname(llrint)(makemathname(long_long_max_mask)); }
makemathname(test_llrint_long_long_min_mask)420 long long makemathname(test_llrint_long_long_min_mask)(void) { return makemathname(llrint)(makemathname(long_long_min_mask)); }
makemathname(test_llrint_long_long_max_one)421 long long makemathname(test_llrint_long_long_max_one)(void) { return makemathname(llrint)(makemathname(long_long_max_one)); }
makemathname(test_llrint_long_long_min_one)422 long long makemathname(test_llrint_long_long_min_one)(void) { return makemathname(llrint)(makemathname(long_long_min_one)); }
423 
makemathname(test_lround_qnan)424 long long makemathname(test_lround_qnan)(void) { makemathname(llignore) = makemathname(lround)(makemathname(qnanval)); return 0; }
makemathname(test_lround_snan)425 long long makemathname(test_lround_snan)(void) { makemathname(llignore) = makemathname(lround)(makemathname(snanval)); return 0; }
makemathname(test_lround_inf)426 long long makemathname(test_lround_inf)(void) { makemathname(llignore) = makemathname(lround)(makemathname(infval)); return 0; }
makemathname(test_lround_neginf)427 long long makemathname(test_lround_neginf)(void) { makemathname(llignore) = makemathname(lround)(-makemathname(infval)); return 0; }
makemathname(test_lround_big)428 long long makemathname(test_lround_big)(void) { makemathname(llignore) = makemathname(lround)(makemathname(big)); return 0; }
makemathname(test_lround_negbig)429 long long makemathname(test_lround_negbig)(void) { makemathname(llignore) = makemathname(lround)(-makemathname(big)); return 0; }
makemathname(test_lround_long_max_mask)430 long long makemathname(test_lround_long_max_mask)(void) { return makemathname(lround)(makemathname(long_max_mask)); }
makemathname(test_lround_long_min_mask)431 long long makemathname(test_lround_long_min_mask)(void) { return makemathname(lround)(makemathname(long_min_mask)); }
makemathname(test_lround_long_max_one)432 long long makemathname(test_lround_long_max_one)(void) { return makemathname(lround)(makemathname(long_max_one)); }
makemathname(test_lround_long_min_one)433 long long makemathname(test_lround_long_min_one)(void) { return makemathname(lround)(makemathname(long_min_one)); }
434 
makemathname(test_llround_qnan)435 long long makemathname(test_llround_qnan)(void) { makemathname(llignore) = makemathname(llround)(makemathname(qnanval)); return 0; }
makemathname(test_llround_snan)436 long long makemathname(test_llround_snan)(void) { makemathname(llignore) = makemathname(llround)(makemathname(snanval)); return 0; }
makemathname(test_llround_inf)437 long long makemathname(test_llround_inf)(void) { makemathname(llignore) = makemathname(llround)(makemathname(infval)); return 0; }
makemathname(test_llround_neginf)438 long long makemathname(test_llround_neginf)(void) { makemathname(llignore) = makemathname(llround)(-makemathname(infval)); return 0; }
makemathname(test_llround_big)439 long long makemathname(test_llround_big)(void) { makemathname(llignore) = makemathname(llround)(makemathname(big)); return 0; }
makemathname(test_llround_negbig)440 long long makemathname(test_llround_negbig)(void) { makemathname(llignore) = makemathname(llround)(-makemathname(big)); return 0; }
makemathname(test_llround_long_long_max_mask)441 long long makemathname(test_llround_long_long_max_mask)(void) { return makemathname(llround)(makemathname(long_long_max_mask)); }
makemathname(test_llround_long_long_min_mask)442 long long makemathname(test_llround_long_long_min_mask)(void) { return makemathname(llround)(makemathname(long_long_min_mask)); }
makemathname(test_llround_long_long_max_one)443 long long makemathname(test_llround_long_long_max_one)(void) { return makemathname(llround)(makemathname(long_long_max_one)); }
makemathname(test_llround_long_long_min_one)444 long long makemathname(test_llround_long_long_min_one)(void) { return makemathname(llround)(makemathname(long_long_min_one)); }
445 
446 #ifndef SIMPLE_MATH_ONLY
447 
makemathname(test_nextafter_0_neg0)448 FLOAT_T makemathname(test_nextafter_0_neg0)(void) { return makemathname(nextafter)(makemathname(zero), -makemathname(zero)); }
makemathname(test_nextafter_neg0_0)449 FLOAT_T makemathname(test_nextafter_neg0_0)(void) { return makemathname(nextafter)(-makemathname(zero), makemathname(zero)); }
makemathname(test_nextafter_0_1)450 FLOAT_T makemathname(test_nextafter_0_1)(void) { return makemathname(nextafter)(makemathname(zero), makemathname(one)); }
makemathname(test_nextafter_0_neg1)451 FLOAT_T makemathname(test_nextafter_0_neg1)(void) { return makemathname(nextafter)(makemathname(zero), -makemathname(one)); }
makemathname(test_nextafter_min_1)452 FLOAT_T makemathname(test_nextafter_min_1)(void) { return makemathname(nextafter)(makemathname(min_val), makemathname(one)); }
makemathname(test_nextafter_negmin_neg1)453 FLOAT_T makemathname(test_nextafter_negmin_neg1)(void) { return makemathname(nextafter)(-makemathname(min_val), -makemathname(one)); }
makemathname(test_nextafter_qnan_1)454 FLOAT_T makemathname(test_nextafter_qnan_1)(void) { return makemathname(nextafter)(makemathname(qnanval), makemathname(one)); }
makemathname(test_nextafter_snan_1)455 FLOAT_T makemathname(test_nextafter_snan_1)(void) { return makemathname(nextafter)(makemathname(snanval), makemathname(one)); }
makemathname(test_nextafter_1_qnan)456 FLOAT_T makemathname(test_nextafter_1_qnan)(void) { return makemathname(nextafter)(makemathname(one), makemathname(qnanval)); }
makemathname(test_nextafter_1_snan)457 FLOAT_T makemathname(test_nextafter_1_snan)(void) { return makemathname(nextafter)(makemathname(one), makemathname(snanval)); }
makemathname(test_nextafter_max_inf)458 FLOAT_T makemathname(test_nextafter_max_inf)(void) { return makemathname(nextafter)(makemathname(max_val), makemathname(infval)); }
makemathname(test_nextafter_negmax_neginf)459 FLOAT_T makemathname(test_nextafter_negmax_neginf)(void) { return makemathname(nextafter)(-makemathname(max_val), -makemathname(infval)); }
makemathname(test_nextafter_min_0)460 FLOAT_T makemathname(test_nextafter_min_0)(void) { return makemathname(nextafter)(makemathname(min_val), makemathname(zero)); }
makemathname(test_nextafter_negmin_0)461 FLOAT_T makemathname(test_nextafter_negmin_0)(void) { return makemathname(nextafter)(-makemathname(min_val), makemathname(zero)); }
makemathname(test_nextafter_1_2)462 FLOAT_T makemathname(test_nextafter_1_2)(void) {return makemathname(nextafter)(makemathname(one), makemathname(two)); }
makemathname(test_nextafter_neg1_neg2)463 FLOAT_T makemathname(test_nextafter_neg1_neg2)(void) {return makemathname(nextafter)(-makemathname(one), -makemathname(two)); }
464 
465 #if defined(_TEST_LONG_DOUBLE) && !defined(NO_NEXTTOWARD)
466 
makemathname(test_nexttoward_0_neg0)467 FLOAT_T makemathname(test_nexttoward_0_neg0)(void) { return makemathname(nexttoward)(makemathname(zero), -makelname(zero)); }
makemathname(test_nexttoward_neg0_0)468 FLOAT_T makemathname(test_nexttoward_neg0_0)(void) { return makemathname(nexttoward)(-makemathname(zero), makelname(zero)); }
makemathname(test_nexttoward_0_1)469 FLOAT_T makemathname(test_nexttoward_0_1)(void) { return makemathname(nexttoward)(makemathname(zero), makelname(one)); }
makemathname(test_nexttoward_0_neg1)470 FLOAT_T makemathname(test_nexttoward_0_neg1)(void) { return makemathname(nexttoward)(makemathname(zero), -makelname(one)); }
makemathname(test_nexttoward_min_1)471 FLOAT_T makemathname(test_nexttoward_min_1)(void) { return makemathname(nexttoward)(makemathname(min_val), makelname(one)); }
makemathname(test_nexttoward_negmin_neg1)472 FLOAT_T makemathname(test_nexttoward_negmin_neg1)(void) { return makemathname(nexttoward)(-makemathname(min_val), -makelname(one)); }
makemathname(test_nexttoward_qnan_1)473 FLOAT_T makemathname(test_nexttoward_qnan_1)(void) { return makemathname(nexttoward)(makemathname(qnanval), makelname(one)); }
makemathname(test_nexttoward_snan_1)474 FLOAT_T makemathname(test_nexttoward_snan_1)(void) { return makemathname(nexttoward)(makemathname(snanval), makelname(one)); }
makemathname(test_nexttoward_1_qnan)475 FLOAT_T makemathname(test_nexttoward_1_qnan)(void) { return makemathname(nexttoward)(makemathname(one), makelname(qnanval)); }
makemathname(test_nexttoward_1_snan)476 FLOAT_T makemathname(test_nexttoward_1_snan)(void) { return makemathname(nexttoward)(makemathname(one), makelname(snanval)); }
makemathname(test_nexttoward_max_inf)477 FLOAT_T makemathname(test_nexttoward_max_inf)(void) { return makemathname(nexttoward)(makemathname(max_val), makelname(infval)); }
makemathname(test_nexttoward_negmax_neginf)478 FLOAT_T makemathname(test_nexttoward_negmax_neginf)(void) { return makemathname(nexttoward)(-makemathname(max_val), -makelname(infval)); }
makemathname(test_nexttoward_min_0)479 FLOAT_T makemathname(test_nexttoward_min_0)(void) { return makemathname(nexttoward)(makemathname(min_val), makelname(zero)); }
makemathname(test_nexttoward_negmin_0)480 FLOAT_T makemathname(test_nexttoward_negmin_0)(void) { return makemathname(nexttoward)(-makemathname(min_val), makelname(zero)); }
makemathname(test_nexttoward_1_2)481 FLOAT_T makemathname(test_nexttoward_1_2)(void) {return makemathname(nexttoward)(makemathname(one), makelname(two)); }
makemathname(test_nexttoward_neg1_neg2)482 FLOAT_T makemathname(test_nexttoward_neg1_neg2)(void) {return makemathname(nexttoward)(-makemathname(one), -makelname(two)); }
483 
484 #endif
485 
makemathname(test_sin_inf)486 FLOAT_T makemathname(test_sin_inf)(void) { return makemathname(sin)(makemathname(infval)); }
makemathname(test_sin_qnan)487 FLOAT_T makemathname(test_sin_qnan)(void) { return makemathname(sin)(makemathname(qnanval)); }
makemathname(test_sin_snan)488 FLOAT_T makemathname(test_sin_snan)(void) { return makemathname(sin)(makemathname(snanval)); }
makemathname(test_sin_pio2)489 FLOAT_T makemathname(test_sin_pio2)(void) { return makemathname(sin)(makemathname(pio2)); }
makemathname(test_sin_small)490 FLOAT_T makemathname(test_sin_small)(void) { return makemathname(sin)(makemathname(small)); }
makemathname(test_sin_0)491 FLOAT_T makemathname(test_sin_0)(void) { return makemathname(sin)(makemathname(zero)); }
492 
493 /* This is mostly here to make sure sincos doesn't infinite loop due to compiler optimization */
makemathname(test_sincos)494 FLOAT_T makemathname(test_sincos)(void) {
495         FLOAT_T s, c;
496         makemathname(sincos)(makemathname(one), &s, &c);
497         FLOAT_T h = makemathname(sqrt)(s*s+c*c);
498         return (FLOAT_T)0.9999 <= h && h <= (FLOAT_T)1.0001;
499 }
makemathname(test_sincos_inf)500 FLOAT_T makemathname(test_sincos_inf)(void) { FLOAT_T s, c; makemathname(sincos)(makemathname(infval), &s, &c); return s + c; }
makemathname(test_sincos_qnan)501 FLOAT_T makemathname(test_sincos_qnan)(void) { FLOAT_T s, c; makemathname(sincos)(makemathname(qnanval), &s, &c); return s + c; }
makemathname(test_sincos_snan)502 FLOAT_T makemathname(test_sincos_snan)(void) { FLOAT_T s, c; makemathname(sincos)(makemathname(snanval), &s, &c); return s + c; }
503 
makemathname(test_sinh_qnan)504 FLOAT_T makemathname(test_sinh_qnan)(void) { return makemathname(sinh)(makemathname(qnanval)); }
makemathname(test_sinh_snan)505 FLOAT_T makemathname(test_sinh_snan)(void) { return makemathname(sinh)(makemathname(snanval)); }
makemathname(test_sinh_0)506 FLOAT_T makemathname(test_sinh_0)(void) { return makemathname(sinh)(makemathname(zero)); }
makemathname(test_sinh_neg0)507 FLOAT_T makemathname(test_sinh_neg0)(void) { return makemathname(sinh)(-makemathname(zero)); }
makemathname(test_sinh_inf)508 FLOAT_T makemathname(test_sinh_inf)(void) { return makemathname(sinh)(makemathname(infval)); }
makemathname(test_sinh_neginf)509 FLOAT_T makemathname(test_sinh_neginf)(void) { return makemathname(sinh)(-makemathname(infval)); }
510 
makemathname(test_tgamma_qnan)511 FLOAT_T makemathname(test_tgamma_qnan)(void) { return makemathname(tgamma)(makemathname(qnanval)); }
makemathname(test_tgamma_snan)512 FLOAT_T makemathname(test_tgamma_snan)(void) { return makemathname(tgamma)(makemathname(snanval)); }
makemathname(test_tgamma_0)513 FLOAT_T makemathname(test_tgamma_0)(void) { return makemathname(tgamma)(makemathname(zero)); }
makemathname(test_tgamma_neg0)514 FLOAT_T makemathname(test_tgamma_neg0)(void) { return makemathname(tgamma)(makemathname(negzero)); }
makemathname(test_tgamma_neg1)515 FLOAT_T makemathname(test_tgamma_neg1)(void) { return makemathname(tgamma)(-makemathname(one)); }
makemathname(test_tgamma_big)516 FLOAT_T makemathname(test_tgamma_big)(void) { return makemathname(tgamma)(makemathname(big)); }
makemathname(test_tgamma_negbig)517 FLOAT_T makemathname(test_tgamma_negbig)(void) { return makemathname(tgamma)(makemathname(-big)); }
makemathname(test_tgamma_inf)518 FLOAT_T makemathname(test_tgamma_inf)(void) { return makemathname(tgamma)(makemathname(infval)); }
makemathname(test_tgamma_neginf)519 FLOAT_T makemathname(test_tgamma_neginf)(void) { return makemathname(tgamma)(-makemathname(infval)); }
makemathname(test_tgamma_small)520 FLOAT_T makemathname(test_tgamma_small)(void) { return makemathname(tgamma)(makemathname(small)); }
makemathname(test_tgamma_negsmall)521 FLOAT_T makemathname(test_tgamma_negsmall)(void) { return makemathname(tgamma)(-makemathname(small)); }
522 
makemathname(test_lgamma_qnan)523 FLOAT_T makemathname(test_lgamma_qnan)(void) { return makemathname(lgamma)(makemathname(qnanval)); }
makemathname(test_lgamma_snan)524 FLOAT_T makemathname(test_lgamma_snan)(void) { return makemathname(lgamma)(makemathname(snanval)); }
makemathname(test_lgamma_1)525 FLOAT_T makemathname(test_lgamma_1)(void) { return makemathname(lgamma)(makemathname(one)); }
makemathname(test_lgamma_2)526 FLOAT_T makemathname(test_lgamma_2)(void) { return makemathname(lgamma)(makemathname(two)); }
makemathname(test_lgamma_inf)527 FLOAT_T makemathname(test_lgamma_inf)(void) { return makemathname(lgamma)(makemathname(infval)); }
makemathname(test_lgamma_neginf)528 FLOAT_T makemathname(test_lgamma_neginf)(void) { return makemathname(lgamma)(-makemathname(infval)); }
makemathname(test_lgamma_0)529 FLOAT_T makemathname(test_lgamma_0)(void) { return makemathname(lgamma)(makemathname(zero)); }
makemathname(test_lgamma_neg0)530 FLOAT_T makemathname(test_lgamma_neg0)(void) { return makemathname(lgamma)(makemathname(negzero)); }
makemathname(test_lgamma_neg1)531 FLOAT_T makemathname(test_lgamma_neg1)(void) { return makemathname(lgamma)(-makemathname(one)); }
makemathname(test_lgamma_neg2)532 FLOAT_T makemathname(test_lgamma_neg2)(void) { return makemathname(lgamma)(-makemathname(two)); }
makemathname(test_lgamma_big)533 FLOAT_T makemathname(test_lgamma_big)(void) { return makemathname(lgamma)(makemathname(big)); }
makemathname(test_lgamma_negbig)534 FLOAT_T makemathname(test_lgamma_negbig)(void) { return makemathname(lgamma)(makemathname(-big)); }
535 
makemathname(test_lgamma_r_qnan)536 FLOAT_T makemathname(test_lgamma_r_qnan)(void) { return makemathname_r(lgamma)(makemathname(qnanval), &_signgam); }
makemathname(test_lgamma_r_snan)537 FLOAT_T makemathname(test_lgamma_r_snan)(void) { return makemathname_r(lgamma)(makemathname(snanval), &_signgam); }
makemathname(test_lgamma_r_1)538 FLOAT_T makemathname(test_lgamma_r_1)(void) { return makemathname_r(lgamma)(makemathname(one), &_signgam); }
makemathname(test_lgamma_r_2)539 FLOAT_T makemathname(test_lgamma_r_2)(void) { return makemathname_r(lgamma)(makemathname(two), &_signgam); }
makemathname(test_lgamma_r_inf)540 FLOAT_T makemathname(test_lgamma_r_inf)(void) { return makemathname_r(lgamma)(makemathname(infval), &_signgam); }
makemathname(test_lgamma_r_neginf)541 FLOAT_T makemathname(test_lgamma_r_neginf)(void) { return makemathname_r(lgamma)(-makemathname(infval), &_signgam); }
makemathname(test_lgamma_r_0)542 FLOAT_T makemathname(test_lgamma_r_0)(void) { return makemathname_r(lgamma)(makemathname(zero), &_signgam); }
makemathname(test_lgamma_r_neg0)543 FLOAT_T makemathname(test_lgamma_r_neg0)(void) { return makemathname_r(lgamma)(makemathname(negzero), &_signgam); }
makemathname(test_lgamma_r_neg1)544 FLOAT_T makemathname(test_lgamma_r_neg1)(void) { return makemathname_r(lgamma)(-makemathname(one), &_signgam); }
makemathname(test_lgamma_r_neg2)545 FLOAT_T makemathname(test_lgamma_r_neg2)(void) { return makemathname_r(lgamma)(-makemathname(two), &_signgam); }
makemathname(test_lgamma_r_big)546 FLOAT_T makemathname(test_lgamma_r_big)(void) { return makemathname_r(lgamma)(makemathname(big), &_signgam); }
makemathname(test_lgamma_r_negbig)547 FLOAT_T makemathname(test_lgamma_r_negbig)(void) { return makemathname_r(lgamma)(makemathname(-big), &_signgam); }
548 
makemathname(test_gamma_qnan)549 FLOAT_T makemathname(test_gamma_qnan)(void) { return makemathname(gamma)(makemathname(qnanval)); }
makemathname(test_gamma_snan)550 FLOAT_T makemathname(test_gamma_snan)(void) { return makemathname(gamma)(makemathname(snanval)); }
makemathname(test_gamma_1)551 FLOAT_T makemathname(test_gamma_1)(void) { return makemathname(gamma)(makemathname(one)); }
makemathname(test_gamma_2)552 FLOAT_T makemathname(test_gamma_2)(void) { return makemathname(gamma)(makemathname(two)); }
makemathname(test_gamma_inf)553 FLOAT_T makemathname(test_gamma_inf)(void) { return makemathname(gamma)(makemathname(infval)); }
makemathname(test_gamma_neginf)554 FLOAT_T makemathname(test_gamma_neginf)(void) { return makemathname(gamma)(-makemathname(infval)); }
makemathname(test_gamma_0)555 FLOAT_T makemathname(test_gamma_0)(void) { return makemathname(gamma)(makemathname(zero)); }
makemathname(test_gamma_neg0)556 FLOAT_T makemathname(test_gamma_neg0)(void) { return makemathname(gamma)(makemathname(negzero)); }
makemathname(test_gamma_neg1)557 FLOAT_T makemathname(test_gamma_neg1)(void) { return makemathname(gamma)(-makemathname(one)); }
makemathname(test_gamma_neg2)558 FLOAT_T makemathname(test_gamma_neg2)(void) { return makemathname(gamma)(-makemathname(two)); }
makemathname(test_gamma_big)559 FLOAT_T makemathname(test_gamma_big)(void) { return makemathname(gamma)(makemathname(big)); }
makemathname(test_gamma_negbig)560 FLOAT_T makemathname(test_gamma_negbig)(void) { return makemathname(gamma)(makemathname(-big)); }
561 
makemathname(test_log_qnan)562 FLOAT_T makemathname(test_log_qnan)(void) { return makemathname(log)(makemathname(qnanval)); }
makemathname(test_log_snan)563 FLOAT_T makemathname(test_log_snan)(void) { return makemathname(log)(makemathname(snanval)); }
makemathname(test_log_1)564 FLOAT_T makemathname(test_log_1)(void) { return makemathname(log)(makemathname(one)); }
makemathname(test_log_inf)565 FLOAT_T makemathname(test_log_inf)(void) { return makemathname(log)(makemathname(infval)); }
makemathname(test_log_0)566 FLOAT_T makemathname(test_log_0)(void) { return makemathname(log)(makemathname(zero)); }
makemathname(test_log_neg)567 FLOAT_T makemathname(test_log_neg)(void) { return makemathname(log)(-makemathname(one)); }
makemathname(test_log_neginf)568 FLOAT_T makemathname(test_log_neginf)(void) { return makemathname(log)(-makemathname(one)); }
569 
makemathname(test_log10_qnan)570 FLOAT_T makemathname(test_log10_qnan)(void) { return makemathname(log10)(makemathname(qnanval)); }
makemathname(test_log10_snan)571 FLOAT_T makemathname(test_log10_snan)(void) { return makemathname(log10)(makemathname(snanval)); }
makemathname(test_log10_1)572 FLOAT_T makemathname(test_log10_1)(void) { return makemathname(log10)(makemathname(one)); }
makemathname(test_log10_inf)573 FLOAT_T makemathname(test_log10_inf)(void) { return makemathname(log10)(makemathname(infval)); }
makemathname(test_log10_0)574 FLOAT_T makemathname(test_log10_0)(void) { return makemathname(log10)(makemathname(zero)); }
makemathname(test_log10_neg)575 FLOAT_T makemathname(test_log10_neg)(void) { return makemathname(log10)(-makemathname(one)); }
makemathname(test_log10_neginf)576 FLOAT_T makemathname(test_log10_neginf)(void) { return makemathname(log10)(-makemathname(one)); }
577 
makemathname(test_log1p_qnan)578 FLOAT_T makemathname(test_log1p_qnan)(void) { return makemathname(log1p)(makemathname(qnanval)); }
makemathname(test_log1p_snan)579 FLOAT_T makemathname(test_log1p_snan)(void) { return makemathname(log1p)(makemathname(snanval)); }
makemathname(test_log1p_inf)580 FLOAT_T makemathname(test_log1p_inf)(void) { return makemathname(log1p)(makemathname(infval)); }
makemathname(test_log1p_neginf)581 FLOAT_T makemathname(test_log1p_neginf)(void) { return makemathname(log1p)(-makemathname(infval)); }
makemathname(test_log1p_neg1)582 FLOAT_T makemathname(test_log1p_neg1)(void) { return makemathname(log1p)(-makemathname(one)); }
makemathname(test_log1p_neg2)583 FLOAT_T makemathname(test_log1p_neg2)(void) { return makemathname(log1p)(-makemathname(two)); }
584 
makemathname(test_log2_qnan)585 FLOAT_T makemathname(test_log2_qnan)(void) { return makemathname(log2)(makemathname(qnanval)); }
makemathname(test_log2_snan)586 FLOAT_T makemathname(test_log2_snan)(void) { return makemathname(log2)(makemathname(snanval)); }
makemathname(test_log2_1)587 FLOAT_T makemathname(test_log2_1)(void) { return makemathname(log2)(makemathname(one)); }
makemathname(test_log2_inf)588 FLOAT_T makemathname(test_log2_inf)(void) { return makemathname(log2)(makemathname(infval)); }
makemathname(test_log2_0)589 FLOAT_T makemathname(test_log2_0)(void) { return makemathname(log2)(makemathname(zero)); }
makemathname(test_log2_neg)590 FLOAT_T makemathname(test_log2_neg)(void) { return makemathname(log2)(-makemathname(one)); }
makemathname(test_log2_neginf)591 FLOAT_T makemathname(test_log2_neginf)(void) { return makemathname(log2)(-makemathname(one)); }
592 
593 #endif
594 
makemathname(test_logb_qnan)595 FLOAT_T makemathname(test_logb_qnan)(void) { return makemathname(logb)(makemathname(qnanval)); }
makemathname(test_logb_snan)596 FLOAT_T makemathname(test_logb_snan)(void) { return makemathname(logb)(makemathname(snanval)); }
makemathname(test_logb_0)597 FLOAT_T makemathname(test_logb_0)(void) { return makemathname(logb)(makemathname(zero)); }
makemathname(test_logb_neg0)598 FLOAT_T makemathname(test_logb_neg0)(void) { return makemathname(logb)(-makemathname(zero)); }
makemathname(test_logb_inf)599 FLOAT_T makemathname(test_logb_inf)(void) { return makemathname(logb)(makemathname(infval)); }
makemathname(test_logb_neginf)600 FLOAT_T makemathname(test_logb_neginf)(void) { return makemathname(logb)(-makemathname(infval)); }
601 
602 #ifndef SIMPLE_MATH_ONLY
603 
makemathname(test_pow_neg_half)604 FLOAT_T makemathname(test_pow_neg_half)(void) { return makemathname(pow)(-makemathname(two), makemathname(half)); }
makemathname(test_pow_big)605 FLOAT_T makemathname(test_pow_big)(void) { return makemathname(pow)(makemathname(two), makemathname(big)); }
makemathname(test_pow_negbig)606 FLOAT_T makemathname(test_pow_negbig)(void) { return makemathname(pow)(-makemathname(big), makemathname(three)); }
makemathname(test_pow_tiny)607 FLOAT_T makemathname(test_pow_tiny)(void) { return makemathname(pow)(makemathname(two), -makemathname(big)); }
makemathname(test_pow_1_1)608 FLOAT_T makemathname(test_pow_1_1)(void) { return makemathname(pow)(makemathname(one), makemathname(one)); }
makemathname(test_pow_1_2)609 FLOAT_T makemathname(test_pow_1_2)(void) { return makemathname(pow)(makemathname(one), makemathname(two)); }
makemathname(test_pow_1_neg2)610 FLOAT_T makemathname(test_pow_1_neg2)(void) { return makemathname(pow)(makemathname(one), makemathname(two)); }
makemathname(test_pow_1_inf)611 FLOAT_T makemathname(test_pow_1_inf)(void) { return makemathname(pow)(makemathname(one), makemathname(infval)); }
makemathname(test_pow_1_neginf)612 FLOAT_T makemathname(test_pow_1_neginf)(void) { return makemathname(pow)(makemathname(one), -makemathname(infval)); }
makemathname(test_pow_1_qnan)613 FLOAT_T makemathname(test_pow_1_qnan)(void) { return makemathname(pow)(makemathname(one), makemathname(qnanval)); }
makemathname(test_pow_qnan_0)614 FLOAT_T makemathname(test_pow_qnan_0)(void) { return makemathname(pow)(makemathname(qnanval), makemathname(zero)); }
makemathname(test_pow_qnan_neg0)615 FLOAT_T makemathname(test_pow_qnan_neg0)(void) { return makemathname(pow)(makemathname(qnanval), -makemathname(zero)); }
makemathname(test_pow_1_snan)616 FLOAT_T makemathname(test_pow_1_snan)(void) { return makemathname(pow)(makemathname(one), makemathname(snanval)); }
makemathname(test_pow_snan_0)617 FLOAT_T makemathname(test_pow_snan_0)(void) { return makemathname(pow)(makemathname(snanval), makemathname(zero)); }
makemathname(test_pow_snan_neg0)618 FLOAT_T makemathname(test_pow_snan_neg0)(void) { return makemathname(pow)(makemathname(snanval), -makemathname(zero)); }
makemathname(test_pow_1_0)619 FLOAT_T makemathname(test_pow_1_0)(void) { return makemathname(pow)(makemathname(one), makemathname(zero)); }
makemathname(test_pow_1_neg0)620 FLOAT_T makemathname(test_pow_1_neg0)(void) { return makemathname(pow)(makemathname(one), -makemathname(zero)); }
makemathname(test_pow_0_0)621 FLOAT_T makemathname(test_pow_0_0)(void) { return makemathname(pow)(makemathname(zero), makemathname(zero)); }
makemathname(test_pow_0_neg0)622 FLOAT_T makemathname(test_pow_0_neg0)(void) { return makemathname(pow)(makemathname(zero), -makemathname(zero)); }
makemathname(test_pow_inf_0)623 FLOAT_T makemathname(test_pow_inf_0)(void) { return makemathname(pow)(makemathname(infval), makemathname(zero)); }
makemathname(test_pow_inf_neg0)624 FLOAT_T makemathname(test_pow_inf_neg0)(void) { return makemathname(pow)(makemathname(infval), -makemathname(zero)); }
makemathname(test_pow_0_odd)625 FLOAT_T makemathname(test_pow_0_odd)(void) { return makemathname(pow)(makemathname(zero), makemathname(three)); }
makemathname(test_pow_neg0_odd)626 FLOAT_T makemathname(test_pow_neg0_odd)(void) { return makemathname(pow)(-makemathname(zero), makemathname(three)); }
makemathname(test_pow_neg1_inf)627 FLOAT_T makemathname(test_pow_neg1_inf)(void) { return makemathname(pow)(-makemathname(one), makemathname(infval)); }
makemathname(test_pow_neg1_neginf)628 FLOAT_T makemathname(test_pow_neg1_neginf)(void) { return makemathname(pow)(-makemathname(one), -makemathname(infval)); }
makemathname(test_pow_half_neginf)629 FLOAT_T makemathname(test_pow_half_neginf)(void) { return makemathname(pow)(makemathname(half), -makemathname(infval)); }
makemathname(test_pow_neghalf_neginf)630 FLOAT_T makemathname(test_pow_neghalf_neginf)(void) { return makemathname(pow)(-makemathname(half), -makemathname(infval)); }
makemathname(test_pow_2_neginf)631 FLOAT_T makemathname(test_pow_2_neginf)(void) { return makemathname(pow)(makemathname(two), -makemathname(infval)); }
makemathname(test_pow_neg2_neginf)632 FLOAT_T makemathname(test_pow_neg2_neginf)(void) { return makemathname(pow)(-makemathname(two), -makemathname(infval)); }
makemathname(test_pow_half_inf)633 FLOAT_T makemathname(test_pow_half_inf)(void) { return makemathname(pow)(makemathname(half), makemathname(infval)); }
makemathname(test_pow_neghalf_inf)634 FLOAT_T makemathname(test_pow_neghalf_inf)(void) { return makemathname(pow)(-makemathname(half), makemathname(infval)); }
makemathname(test_pow_2_inf)635 FLOAT_T makemathname(test_pow_2_inf)(void) { return makemathname(pow)(makemathname(two), makemathname(infval)); }
makemathname(test_pow_2_qnan)636 FLOAT_T makemathname(test_pow_2_qnan)(void) { return makemathname(pow)(makemathname(two), makemathname(qnanval)); }
makemathname(test_pow_2_snan)637 FLOAT_T makemathname(test_pow_2_snan)(void) { return makemathname(pow)(makemathname(two), makemathname(snanval)); }
makemathname(test_pow_neg2_inf)638 FLOAT_T makemathname(test_pow_neg2_inf)(void) { return makemathname(pow)(-makemathname(two), makemathname(infval)); }
makemathname(test_pow_neginf_negodd)639 FLOAT_T makemathname(test_pow_neginf_negodd)(void) { return makemathname(pow)(-makemathname(infval), -makemathname(three)); }
makemathname(test_pow_neginf_neghalf)640 FLOAT_T makemathname(test_pow_neginf_neghalf)(void) { return makemathname(pow)(-makemathname(infval), -makemathname(half)); }
makemathname(test_pow_neginf_neg2)641 FLOAT_T makemathname(test_pow_neginf_neg2)(void) { return makemathname(pow)(-makemathname(infval), -makemathname(two)); }
makemathname(test_pow_neginf_odd)642 FLOAT_T makemathname(test_pow_neginf_odd)(void) { return makemathname(pow)(-makemathname(infval), makemathname(three)); }
makemathname(test_pow_neginf_half)643 FLOAT_T makemathname(test_pow_neginf_half)(void) { return makemathname(pow)(-makemathname(infval), makemathname(half)); }
makemathname(test_pow_neginf_2)644 FLOAT_T makemathname(test_pow_neginf_2)(void) { return makemathname(pow)(-makemathname(infval), makemathname(two)); }
makemathname(test_pow_inf_neg2)645 FLOAT_T makemathname(test_pow_inf_neg2)(void) { return makemathname(pow)(makemathname(infval), -makemathname(two)); }
makemathname(test_pow_inf_2)646 FLOAT_T makemathname(test_pow_inf_2)(void) { return makemathname(pow)(makemathname(infval), makemathname(two)); }
makemathname(test_pow_0_neg2)647 FLOAT_T makemathname(test_pow_0_neg2)(void) { return makemathname(pow)(makemathname(zero), -makemathname(two)); }
makemathname(test_pow_neg0_neg2)648 FLOAT_T makemathname(test_pow_neg0_neg2)(void) { return makemathname(pow)(-makemathname(zero), -makemathname(two)); }
makemathname(test_pow_0_neghalf)649 FLOAT_T makemathname(test_pow_0_neghalf)(void) { return makemathname(pow)(makemathname(zero), -makemathname(half)); }
makemathname(test_pow_neg0_neghalf)650 FLOAT_T makemathname(test_pow_neg0_neghalf)(void) { return makemathname(pow)(-makemathname(zero), -makemathname(half)); }
makemathname(test_pow_0_neg3)651 FLOAT_T makemathname(test_pow_0_neg3)(void) { return makemathname(pow)(makemathname(zero), -makemathname(three)); }
makemathname(test_pow_neg0_neg3)652 FLOAT_T makemathname(test_pow_neg0_neg3)(void) { return makemathname(pow)(-makemathname(zero), -makemathname(three)); }
makemathname(test_pow_negsmall_negbigodd)653 FLOAT_T makemathname(test_pow_negsmall_negbigodd)(void) { return makemathname(pow)(-makemathname(small), -makemathname(bigodd)); }
makemathname(test_pow_negbig_bigodd)654 FLOAT_T makemathname(test_pow_negbig_bigodd)(void) { return makemathname(pow)(-makemathname(big), makemathname(bigodd)); }
makemathname(test_pow_negsmall_negbigeven)655 FLOAT_T makemathname(test_pow_negsmall_negbigeven)(void) { return makemathname(pow)(-makemathname(small), -makemathname(bigeven)); }
makemathname(test_pow_negbig_bigeven)656 FLOAT_T makemathname(test_pow_negbig_bigeven)(void) { return makemathname(pow)(-makemathname(big), makemathname(bigeven)); }
657 
658 #ifndef __PICOLIBC__
659 #define pow10(x) exp10(x)
660 #define pow10f(x) exp10f(x)
661 #define pow10l(x) exp10l(x)
662 #endif
663 
makemathname(test_pow10_qnan)664 FLOAT_T makemathname(test_pow10_qnan)(void) { return makemathname(pow10)(makemathname(qnanval)); }
makemathname(test_pow10_snan)665 FLOAT_T makemathname(test_pow10_snan)(void) { return makemathname(pow10)(makemathname(snanval)); }
makemathname(test_pow10_inf)666 FLOAT_T makemathname(test_pow10_inf)(void) { return makemathname(pow10)(makemathname(infval)); }
makemathname(test_pow10_neginf)667 FLOAT_T makemathname(test_pow10_neginf)(void) { return makemathname(pow10)(-makemathname(infval)); }
makemathname(test_pow10_big)668 FLOAT_T makemathname(test_pow10_big)(void) { return makemathname(pow10)(makemathname(big)); }
makemathname(test_pow10_negbig)669 FLOAT_T makemathname(test_pow10_negbig)(void) { return makemathname(pow10)(-makemathname(big)); }
670 
makemathname(test_remainder_0)671 FLOAT_T makemathname(test_remainder_0)(void) { return makemathname(remainder)(makemathname(two), makemathname(zero)); }
makemathname(test_remainder_qnan_1)672 FLOAT_T makemathname(test_remainder_qnan_1)(void) { return makemathname(remainder)(makemathname(qnanval), makemathname(one)); }
makemathname(test_remainder_1_qnan)673 FLOAT_T makemathname(test_remainder_1_qnan)(void) { return makemathname(remainder)(makemathname(one), makemathname(qnanval)); }
makemathname(test_remainder_snan_1)674 FLOAT_T makemathname(test_remainder_snan_1)(void) { return makemathname(remainder)(makemathname(snanval), makemathname(one)); }
makemathname(test_remainder_1_snan)675 FLOAT_T makemathname(test_remainder_1_snan)(void) { return makemathname(remainder)(makemathname(one), makemathname(snanval)); }
makemathname(test_remainder_inf_2)676 FLOAT_T makemathname(test_remainder_inf_2)(void) { return makemathname(remainder)(makemathname(infval), makemathname(two)); }
makemathname(test_remainder_inf_0)677 FLOAT_T makemathname(test_remainder_inf_0)(void) { return makemathname(remainder)(makemathname(infval), makemathname(zero)); }
makemathname(test_remainder_2_0)678 FLOAT_T makemathname(test_remainder_2_0)(void) { return makemathname(remainder)(makemathname(two), makemathname(zero)); }
makemathname(test_remainder_1_2)679 FLOAT_T makemathname(test_remainder_1_2)(void) { return makemathname(remainder)(makemathname(one), makemathname(two)); }
makemathname(test_remainder_neg1_2)680 FLOAT_T makemathname(test_remainder_neg1_2)(void) { return makemathname(remainder)(-makemathname(one), makemathname(two)); }
681 
682 #endif
683 
makemathname(test_sqrt_qnan)684 FLOAT_T makemathname(test_sqrt_qnan)(void) { return makemathname(sqrt)(makemathname(qnanval)); }
makemathname(test_sqrt_snan)685 FLOAT_T makemathname(test_sqrt_snan)(void) { return makemathname(sqrt)(makemathname(snanval)); }
makemathname(test_sqrt_0)686 FLOAT_T makemathname(test_sqrt_0)(void) { return makemathname(sqrt)(makemathname(zero)); }
makemathname(test_sqrt_neg0)687 FLOAT_T makemathname(test_sqrt_neg0)(void) { return makemathname(sqrt)(-makemathname(zero)); }
makemathname(test_sqrt_inf)688 FLOAT_T makemathname(test_sqrt_inf)(void) { return makemathname(sqrt)(makemathname(infval)); }
makemathname(test_sqrt_neginf)689 FLOAT_T makemathname(test_sqrt_neginf)(void) { return makemathname(sqrt)(-makemathname(infval)); }
makemathname(test_sqrt_neg)690 FLOAT_T makemathname(test_sqrt_neg)(void) { return makemathname(sqrt)(-makemathname(two)); }
makemathname(test_sqrt_2)691 FLOAT_T makemathname(test_sqrt_2)(void) { return makemathname(sqrt)(makemathname(two)); }
692 
693 #ifndef SIMPLE_MATH_ONLY
694 
makemathname(test_tan_qnan)695 FLOAT_T makemathname(test_tan_qnan)(void) { return makemathname(tan)(makemathname(qnanval)); }
makemathname(test_tan_snan)696 FLOAT_T makemathname(test_tan_snan)(void) { return makemathname(tan)(makemathname(snanval)); }
makemathname(test_tan_inf)697 FLOAT_T makemathname(test_tan_inf)(void) { return makemathname(tan)(makemathname(infval)); }
makemathname(test_tan_neginf)698 FLOAT_T makemathname(test_tan_neginf)(void) { return makemathname(tan)(-makemathname(infval)); }
makemathname(test_tan_pio2)699 FLOAT_T makemathname(test_tan_pio2)(void) { return makemathname(tan)(makemathname(pio2)); }
700 
makemathname(test_tanh_qnan)701 FLOAT_T makemathname(test_tanh_qnan)(void) { return makemathname(tanh)(makemathname(qnanval)); }
makemathname(test_tanh_snan)702 FLOAT_T makemathname(test_tanh_snan)(void) { return makemathname(tanh)(makemathname(snanval)); }
makemathname(test_tanh_0)703 FLOAT_T makemathname(test_tanh_0)(void) { return makemathname(tanh)(makemathname(zero)); }
makemathname(test_tanh_neg0)704 FLOAT_T makemathname(test_tanh_neg0)(void) { return makemathname(tanh)(-makemathname(zero)); }
makemathname(test_tanh_inf)705 FLOAT_T makemathname(test_tanh_inf)(void) { return makemathname(tanh)(makemathname(infval)); }
makemathname(test_tanh_neginf)706 FLOAT_T makemathname(test_tanh_neginf)(void) { return makemathname(tanh)(-makemathname(infval)); }
707 
708 #ifndef NO_BESSEL_TESTS
makemathname(test_y0_qnan)709 FLOAT_T makemathname(test_y0_qnan)(void) { return makemathname(y0)(makemathname(qnanval)); }
makemathname(test_y0_snan)710 FLOAT_T makemathname(test_y0_snan)(void) { return makemathname(y0)(makemathname(snanval)); }
makemathname(test_y0_inf)711 FLOAT_T makemathname(test_y0_inf)(void) { return makemathname(y0)(makemathname(infval)); }
makemathname(test_y0_neg)712 FLOAT_T makemathname(test_y0_neg)(void) { return makemathname(y0)(-makemathname(one)); }
makemathname(test_y0_0)713 FLOAT_T makemathname(test_y0_0)(void) { return makemathname(y0)(makemathname(zero)); }
714 
makemathname(test_y1_qnan)715 FLOAT_T makemathname(test_y1_qnan)(void) { return makemathname(y1)(makemathname(qnanval)); }
makemathname(test_y1_snan)716 FLOAT_T makemathname(test_y1_snan)(void) { return makemathname(y1)(makemathname(snanval)); }
makemathname(test_y1_inf)717 FLOAT_T makemathname(test_y1_inf)(void) { return makemathname(y1)(makemathname(infval)); }
makemathname(test_y1_neg)718 FLOAT_T makemathname(test_y1_neg)(void) { return makemathname(y1)(-makemathname(one)); }
makemathname(test_y1_0)719 FLOAT_T makemathname(test_y1_0)(void) { return makemathname(y1)(makemathname(zero)); }
720 
makemathname(test_yn_qnan)721 FLOAT_T makemathname(test_yn_qnan)(void) { return makemathname(yn)(2, makemathname(qnanval)); }
makemathname(test_yn_snan)722 FLOAT_T makemathname(test_yn_snan)(void) { return makemathname(yn)(2, makemathname(snanval)); }
makemathname(test_yn_inf)723 FLOAT_T makemathname(test_yn_inf)(void) { return makemathname(yn)(2, makemathname(infval)); }
makemathname(test_yn_neg)724 FLOAT_T makemathname(test_yn_neg)(void) { return makemathname(yn)(2, -makemathname(one)); }
makemathname(test_yn_0)725 FLOAT_T makemathname(test_yn_0)(void) { return makemathname(yn)(2, makemathname(zero)); }
726 #endif
727 
728 #endif
729 
makemathname(test_scalb_1_1)730 FLOAT_T makemathname(test_scalb_1_1)(void) { return makemathname(scalb)(makemathname(one), makemathname(one)); }
makemathname(test_scalb_1_half)731 FLOAT_T makemathname(test_scalb_1_half)(void) { return makemathname(scalb)(makemathname(one), makemathname(half)); }
makemathname(test_scalb_qnan_1)732 FLOAT_T makemathname(test_scalb_qnan_1)(void) { return makemathname(scalb)(makemathname(qnanval), makemathname(one)); }
makemathname(test_scalb_1_qnan)733 FLOAT_T makemathname(test_scalb_1_qnan)(void) { return makemathname(scalb)(makemathname(one), makemathname(qnanval)); }
makemathname(test_scalb_snan_1)734 FLOAT_T makemathname(test_scalb_snan_1)(void) { return makemathname(scalb)(makemathname(snanval), makemathname(one)); }
makemathname(test_scalb_1_snan)735 FLOAT_T makemathname(test_scalb_1_snan)(void) { return makemathname(scalb)(makemathname(one), makemathname(snanval)); }
makemathname(test_scalb_inf_2)736 FLOAT_T makemathname(test_scalb_inf_2)(void) { return makemathname(scalb)(makemathname(infval), makemathname(two)); }
makemathname(test_scalb_neginf_2)737 FLOAT_T makemathname(test_scalb_neginf_2)(void) { return makemathname(scalb)(-makemathname(infval), makemathname(two)); }
makemathname(test_scalb_0_2)738 FLOAT_T makemathname(test_scalb_0_2)(void) { return makemathname(scalb)(makemathname(zero), makemathname(two)); }
makemathname(test_scalb_neg0_2)739 FLOAT_T makemathname(test_scalb_neg0_2)(void) { return makemathname(scalb)(-makemathname(zero), makemathname(two)); }
makemathname(test_scalb_0_inf)740 FLOAT_T makemathname(test_scalb_0_inf)(void) { return makemathname(scalb)(makemathname(zero), makemathname(infval)); }
makemathname(test_scalb_inf_neginf)741 FLOAT_T makemathname(test_scalb_inf_neginf)(void) { return makemathname(scalb)(makemathname(infval), -makemathname(infval)); }
makemathname(test_scalb_neginf_neginf)742 FLOAT_T makemathname(test_scalb_neginf_neginf)(void) { return makemathname(scalb)(-makemathname(infval), -makemathname(infval)); }
makemathname(test_scalb_1_big)743 FLOAT_T makemathname(test_scalb_1_big)(void) { return makemathname(scalb)(makemathname(one), makemathname(big)); }
makemathname(test_scalb_neg1_big)744 FLOAT_T makemathname(test_scalb_neg1_big)(void) { return makemathname(scalb)(-makemathname(one), makemathname(big)); }
makemathname(test_scalb_1_negbig)745 FLOAT_T makemathname(test_scalb_1_negbig)(void) { return makemathname(scalb)(makemathname(one), -makemathname(big)); }
makemathname(test_scalb_neg1_negbig)746 FLOAT_T makemathname(test_scalb_neg1_negbig)(void) { return makemathname(scalb)(-makemathname(one), -makemathname(big)); }
747 
makemathname(test_scalbn_big)748 FLOAT_T makemathname(test_scalbn_big)(void) { return makemathname(scalbn)(makemathname(one), INT_MAX); }
makemathname(test_scalbn_tiny)749 FLOAT_T makemathname(test_scalbn_tiny)(void) { return makemathname(scalbn)(makemathname(one), -INT_MAX); }
750 
751 #ifndef FE_DIVBYZERO
752 #define FE_DIVBYZERO 0
753 #endif
754 #ifndef FE_INEXACT
755 #define FE_INEXACT 0
756 #endif
757 #ifndef FE_INVALID
758 #define FE_INVALID 0
759 #endif
760 #ifndef FE_OVERFLOW
761 #define FE_OVERFLOW 0
762 #endif
763 #ifndef FE_UNDERFLOW
764 #define FE_UNDERFLOW 0
765 #endif
766 
767 #define MY_EXCEPT (FE_DIVBYZERO|FE_INEXACT|FE_INVALID|FE_OVERFLOW|FE_UNDERFLOW)
768 
769 #undef sNAN_RET
770 #undef sNAN_EXCEPTION
771 #if (defined(__i386__) || defined(__HAVE_68881__)) && !defined(TEST_LONG_DOUBLE) && !defined(_SOFT_FLOAT)
772 /*
773  * i386 ABI returns floats in the 8087 registers, which convert sNAN
774  * to NAN on load, so you can't ever return a sNAN value successfully.
775  */
776 #define sNAN_RET        NAN
777 #define sNAN_EXCEPTION  FE_INVALID
778 #else
779 #define sNAN_RET        sNAN
780 #define sNAN_EXCEPTION  0
781 #endif
782 
783 const struct {
784 	FLOAT_T	(*func)(void);
785 	char	*name;
786 	FLOAT_T	value;
787 	int	except;
788 	int	errno_expect;
789 } makemathname(tests)[] = {
790 #ifndef SIMPLE_MATH_ONLY
791 	TEST(acos_2, (FLOAT_T) NAN, FE_INVALID, EDOM),
792 	TEST(acos_qnan, (FLOAT_T) NAN, 0, 0),
793 	TEST(acos_snan, (FLOAT_T) NAN, FE_INVALID, 0),
794 	TEST(acos_inf, (FLOAT_T) NAN, FE_INVALID, EDOM),
795 	TEST(acos_minf, (FLOAT_T) NAN, FE_INVALID, EDOM),
796 
797 	TEST(acosh_half, (FLOAT_T)NAN, FE_INVALID, EDOM),
798 	TEST(acosh_qnan, (FLOAT_T)NAN, 0, 0),
799 	TEST(acosh_snan, (FLOAT_T)NAN, FE_INVALID, 0),
800 	TEST(acosh_inf, (FLOAT_T)INFINITY, 0, 0),
801 	TEST(acosh_minf, (FLOAT_T)NAN, FE_INVALID, EDOM),
802 
803 	TEST(asin_2, (FLOAT_T)NAN, FE_INVALID, EDOM),
804 	TEST(asin_qnan, (FLOAT_T) NAN, 0, 0),
805 	TEST(asin_snan, (FLOAT_T) NAN, FE_INVALID, 0),
806 	TEST(asin_inf, (FLOAT_T) NAN, FE_INVALID, EDOM),
807 	TEST(asin_minf, (FLOAT_T) NAN, FE_INVALID, EDOM),
808 
809         TEST(asinh_qnan, (FLOAT_T)NAN, 0, 0),
810         TEST(asinh_snan, (FLOAT_T)NAN, FE_INVALID, 0),
811         TEST(asinh_0, (FLOAT_T)0.0, 0, 0),
812         TEST(asinh_neg0, (FLOAT_T)-0.0, 0, 0),
813         TEST(asinh_inf, (FLOAT_T)INFINITY, 0, 0),
814         TEST(asinh_minf, (FLOAT_T)-INFINITY, 0, 0),
815 
816         TEST(atan2_qnanx, (FLOAT_T)NAN, 0, 0),
817         TEST(atan2_qnany, (FLOAT_T)NAN, 0, 0),
818         TEST(atan2_snanx, (FLOAT_T)NAN, FE_INVALID, 0),
819         TEST(atan2_snany, (FLOAT_T)NAN, FE_INVALID, 0),
820         TEST(atan2_tiny, (FLOAT_T)0.0, FE_UNDERFLOW|FE_INEXACT, ERANGE),
821         TEST(atan2_nottiny, PI_VAL, 0, 0),
822 
823         TEST(atanh_qnan, (FLOAT_T)NAN, 0, 0),
824         TEST(atanh_snan, (FLOAT_T)NAN, FE_INVALID, 0),
825         TEST(atanh_1, (FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
826         TEST(atanh_neg1, -(FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
827         TEST(atanh_2, (FLOAT_T)NAN, FE_INVALID, EDOM),
828         TEST(atanh_neg2, (FLOAT_T)NAN, FE_INVALID, EDOM),
829 
830         TEST(cbrt_0, (FLOAT_T)0.0, 0, 0),
831         TEST(cbrt_neg0, -(FLOAT_T)0.0, 0, 0),
832         TEST(cbrt_inf, (FLOAT_T)INFINITY, 0, 0),
833         TEST(cbrt_neginf, -(FLOAT_T)INFINITY, 0, 0),
834         TEST(cbrt_qnan, (FLOAT_T)NAN, 0, 0),
835         TEST(cbrt_snan, (FLOAT_T)NAN, FE_INVALID, 0),
836 
837         TEST(cos_inf, (FLOAT_T)NAN, FE_INVALID, EDOM),
838         TEST(cos_qnan, (FLOAT_T)NAN, 0, 0),
839         TEST(cos_snan, (FLOAT_T)NAN, FE_INVALID, 0),
840         TEST(cos_0, (FLOAT_T)1.0, 0, 0),
841 
842         TEST(cosh_inf, (FLOAT_T)INFINITY, 0, 0),
843         TEST(cosh_qnan, (FLOAT_T)NAN, 0, 0),
844         TEST(cosh_snan, (FLOAT_T)NAN, FE_INVALID, 0),
845         TEST(cosh_big, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
846         TEST(cosh_negbig, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
847 
848 	TEST(drem_0, (FLOAT_T)NAN, FE_INVALID, EDOM),
849 	TEST(drem_qnan_1, (FLOAT_T)NAN, 0, 0),
850 	TEST(drem_1_qnan, (FLOAT_T)NAN, 0, 0),
851 	TEST(drem_snan_1, (FLOAT_T)NAN, FE_INVALID, 0),
852 	TEST(drem_1_snan, (FLOAT_T)NAN, FE_INVALID, 0),
853         TEST(drem_inf_2, (FLOAT_T)NAN, FE_INVALID, EDOM),
854         TEST(drem_inf_0, (FLOAT_T)NAN, FE_INVALID, EDOM),
855         TEST(drem_2_0, (FLOAT_T)NAN, FE_INVALID, EDOM),
856         TEST(drem_1_2, (FLOAT_T)1.0, 0, 0),
857         TEST(drem_neg1_2, -(FLOAT_T)1.0, 0, 0),
858 
859         TEST(erf_qnan, (FLOAT_T) NAN, 0, 0),
860         TEST(erf_snan, (FLOAT_T) NAN, FE_INVALID, 0),
861         TEST(erf_0, (FLOAT_T) 0, 0, 0),
862         TEST(erf_neg0, -(FLOAT_T) 0, 0, 0),
863         TEST(erf_inf, (FLOAT_T) 1.0, 0, 0),
864         TEST(erf_neginf, -(FLOAT_T) 1.0, 0, 0),
865         TEST(erf_small, (FLOAT_T) 2.0 * (FLOAT_T) SMALL / (FLOAT_T) 1.772453850905516027298167, FE_UNDERFLOW, 0),
866 
867 	TEST(exp_qnan, (FLOAT_T)NAN, 0, 0),
868 	TEST(exp_snan, (FLOAT_T)NAN, FE_INVALID, 0),
869 	TEST(exp_inf, (FLOAT_T)INFINITY, 0, 0),
870 	TEST(exp_neginf, (FLOAT_T)0.0, 0, 0),
871 	TEST(exp_big, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
872 	TEST(exp_negbig, (FLOAT_T)0.0, FE_UNDERFLOW, ERANGE),
873 
874 	TEST(exp2_qnan, (FLOAT_T)NAN, 0, 0),
875 	TEST(exp2_snan, (FLOAT_T)NAN, FE_INVALID, 0),
876 	TEST(exp2_inf, (FLOAT_T)INFINITY, 0, 0),
877 	TEST(exp2_neginf, (FLOAT_T)0.0, 0, 0),
878 	TEST(exp2_big, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
879 	TEST(exp2_negbig, (FLOAT_T)0.0, FE_UNDERFLOW, ERANGE),
880 
881 	TEST(exp10_qnan, (FLOAT_T)NAN, 0, 0),
882 	TEST(exp10_snan, (FLOAT_T)NAN, FE_INVALID, 0),
883 	TEST(exp10_inf, (FLOAT_T)INFINITY, 0, 0),
884 	TEST(exp10_neginf, (FLOAT_T)0.0, 0, 0),
885 	TEST(exp10_big, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
886 	TEST(exp10_negbig, (FLOAT_T)0.0, FE_UNDERFLOW, ERANGE),
887 
888 	TEST(expm1_qnan, (FLOAT_T)NAN, 0, 0),
889 	TEST(expm1_snan, (FLOAT_T)NAN, FE_INVALID, 0),
890 	TEST(expm1_0, (FLOAT_T)0.0, 0, 0),
891 	TEST(expm1_neg0, -(FLOAT_T)0.0, 0, 0),
892 	TEST(expm1_inf, (FLOAT_T)INFINITY, 0, 0),
893 	TEST(expm1_neginf, -(FLOAT_T)1.0, 0, 0),
894 	TEST(expm1_big, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
895 #if !defined(__PICOLIBC__) && defined(TEST_LONG_DOUBLE) && (defined(__x86_64) || defined(__i386))
896         /* glibc returns incorrect value on x86 */
897 	TEST(expm1_negbig, -(FLOAT_T)1.0, 0, 0),
898 #else
899 	TEST(expm1_negbig, -(FLOAT_T)1.0, FE_INEXACT, 0),
900 #endif
901 
902 #endif
903         TEST(fabs_qnan, (FLOAT_T)NAN, 0, 0),
904 #ifndef SKIP_SNAN_CHECKS
905         TEST(fabs_snan, (FLOAT_T)sNAN_RET, sNAN_EXCEPTION, 0),
906 #endif
907         TEST(fabs_0, (FLOAT_T)0.0, 0, 0),
908         TEST(fabs_neg0, (FLOAT_T)0.0, 0, 0),
909         TEST(fabs_inf, (FLOAT_T)INFINITY, 0, 0),
910         TEST(fabs_neginf, (FLOAT_T)INFINITY, 0, 0),
911 
912 #ifndef SIMPLE_MATH_ONLY
913         TEST(fdim_qnan_1, (FLOAT_T)NAN, 0, 0),
914         TEST(fdim_1_qnan, (FLOAT_T)NAN, 0, 0),
915         TEST(fdim_snan_1, (FLOAT_T)NAN, FE_INVALID, 0),
916         TEST(fdim_1_snan, (FLOAT_T)NAN, FE_INVALID, 0),
917         TEST(fdim_inf_1, (FLOAT_T)INFINITY, 0, 0),
918         TEST(fdim_1_inf, (FLOAT_T)0.0, 0, 0),
919         TEST(fdim_big_negbig, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
920 #endif
921 
922         TEST(floor_1, (FLOAT_T)1.0, 0, 0),
923         TEST(floor_0, (FLOAT_T)0.0, 0, 0),
924         TEST(floor_neg0, -(FLOAT_T)0.0, 0, 0),
925         TEST(floor_qnan, (FLOAT_T)NAN, 0, 0),
926 #ifdef __PICOLIBC__
927         /* looks like glibc gets this wrong */
928         TEST(floor_snan, (FLOAT_T)NAN, FE_INVALID, 0),
929 #endif
930         TEST(floor_inf, (FLOAT_T)INFINITY, 0, 0),
931         TEST(floor_neginf, -(FLOAT_T)INFINITY, 0, 0),
932 
933 #ifndef SIMPLE_MATH_ONLY
934         TEST(fma_big_big_1, (FLOAT_T)INFINITY, FE_OVERFLOW, 0),
935         TEST(fma_big_negbig_1, -(FLOAT_T)INFINITY, FE_OVERFLOW, 0),
936         TEST(fma_small_small_1, (FLOAT_T)1.0, FE_INEXACT, 0),
937         TEST(fma_small_negsmall_1, (FLOAT_T)1.0, FE_INEXACT, 0),
938         TEST(fma_small_small_0, (FLOAT_T)0.0, FE_UNDERFLOW, 0),
939         TEST(fma_small_negsmall_0, -(FLOAT_T)0.0, FE_UNDERFLOW, 0),
940         TEST(fma_qnan_1_1, (FLOAT_T)NAN, 0, 0),
941         TEST(fma_1_qnan_1, (FLOAT_T)NAN, 0, 0),
942         TEST(fma_1_1_qnan, (FLOAT_T)NAN, 0, 0),
943         TEST(fma_inf_1_neginf, (FLOAT_T)NAN, FE_INVALID, 0),
944         TEST(fma_1_inf_neginf, (FLOAT_T)NAN, FE_INVALID, 0),
945         TEST(fma_neginf_1_inf, (FLOAT_T)NAN, FE_INVALID, 0),
946         TEST(fma_1_neginf_inf, (FLOAT_T)NAN, FE_INVALID, 0),
947         TEST(fma_inf_0_1, (FLOAT_T)NAN, FE_INVALID, 0),
948         TEST(fma_0_inf_1, (FLOAT_T)NAN, FE_INVALID, 0),
949 #ifdef __PICOLIBC__
950         /* Linux says these will set FE_INVALID, POSIX says optional, glibc does not set exception */
951         TEST(fma_inf_0_qnan, (FLOAT_T)NAN, FE_INVALID, 0),
952         TEST(fma_0_inf_qnan, (FLOAT_T)NAN, FE_INVALID, 0),
953 #endif
954 #endif
955 
956         TEST(fmax_qnan_qnan, (FLOAT_T)NAN, 0, 0),
957         TEST(fmax_qnan_1, (FLOAT_T)1.0, 0, 0),
958         TEST(fmax_1_qnan, (FLOAT_T)1.0, 0, 0),
959 
960         TEST(fmin_qnan_qnan, (FLOAT_T)NAN, 0, 0),
961         TEST(fmin_qnan_1, (FLOAT_T)1.0, 0, 0),
962         TEST(fmin_1_qnan, (FLOAT_T)1.0, 0, 0),
963 
964 #ifndef SIMPLE_MATH_ONLY
965 
966         TEST(fmod_qnan_1, (FLOAT_T)NAN, 0, 0),
967         TEST(fmod_1_qnan, (FLOAT_T)NAN, 0, 0),
968         TEST(fmod_inf_1, (FLOAT_T)NAN, FE_INVALID, EDOM),
969         TEST(fmod_neginf_1, (FLOAT_T)NAN, FE_INVALID, EDOM),
970         TEST(fmod_1_0, (FLOAT_T)NAN, FE_INVALID, EDOM),
971         TEST(fmod_0_1, (FLOAT_T)0.0, 0, 0),
972         TEST(fmod_neg0_1, -(FLOAT_T)0.0, 0, 0),
973 
974         TEST(gamma_qnan, (FLOAT_T)NAN, 0, 0),
975         TEST(gamma_1, (FLOAT_T) 0.0, 0, 0),
976         TEST(gamma_2, (FLOAT_T) 0.0, 0, 0),
977 	TEST(gamma_0, (FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
978 	TEST(gamma_neg0, (FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
979 	TEST(gamma_neg1, (FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
980 	TEST(gamma_neg2, (FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
981 	TEST(gamma_big, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
982 	TEST(gamma_negbig, (FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
983 	TEST(gamma_inf, (FLOAT_T)INFINITY, 0, 0),
984 	TEST(gamma_neginf, (FLOAT_T)INFINITY, 0, 0),
985 
986 #endif
987 
988 	TEST(hypot_big, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
989         TEST(hypot_1_qnan, (FLOAT_T)NAN, 0, 0),
990         TEST(hypot_qnan_1, (FLOAT_T)NAN, 0, 0),
991         TEST(hypot_inf_qnan, (FLOAT_T)INFINITY, 0, 0),
992         TEST(hypot_neginf_qnan, (FLOAT_T)INFINITY, 0, 0),
993         TEST(hypot_qnan_inf, (FLOAT_T)INFINITY, 0, 0),
994         TEST(hypot_qnan_neginf, (FLOAT_T)INFINITY, 0, 0),
995 #ifndef SKIP_SNAN_CHECKS
996         TEST(hypot_snan_inf, (FLOAT_T)NAN, FE_INVALID, 0),
997         TEST(hypot_snan_neginf, (FLOAT_T)NAN, FE_INVALID, 0),
998 #endif
999         TEST(hypot_1_inf, (FLOAT_T)INFINITY, 0, 0),
1000         TEST(hypot_1_neginf, (FLOAT_T)INFINITY, 0, 0),
1001         TEST(hypot_inf_1, (FLOAT_T)INFINITY, 0, 0),
1002         TEST(hypot_neginf_1, (FLOAT_T)INFINITY, 0, 0),
1003 
1004 #ifndef SIMPLE_MATH_ONLY
1005 
1006 #ifndef NO_BESSEL_TESTS
1007         TEST(j0_inf, 0, 0, 0),
1008         TEST(j0_qnan, (FLOAT_T)NAN, 0, 0),
1009         TEST(j0_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1010 
1011         TEST(j1_inf, 0, 0, 0),
1012         TEST(j1_qnan, (FLOAT_T)NAN, 0, 0),
1013         TEST(j1_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1014 
1015         TEST(jn_inf, 0, 0, 0),
1016         TEST(jn_qnan, (FLOAT_T)NAN, 0, 0),
1017         TEST(jn_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1018 #endif
1019 
1020 #endif
1021 
1022         TEST(ldexp_1_0, (FLOAT_T)1.0, 0, 0),
1023         TEST(ldexp_qnan_0, (FLOAT_T)NAN, 0, 0),
1024         TEST(ldexp_snan_0, (FLOAT_T)NAN, FE_INVALID, 0),
1025         TEST(ldexp_inf_0, (FLOAT_T)INFINITY, 0, 0),
1026         TEST(ldexp_neginf_0, -(FLOAT_T)INFINITY, 0, 0),
1027         TEST(ldexp_1_negbig, (FLOAT_T)0.0, FE_UNDERFLOW, ERANGE),
1028         TEST(ldexp_1_big, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
1029 
1030 #ifndef SIMPLE_MATH_ONLY
1031 
1032         TEST(lgamma_qnan, (FLOAT_T)NAN, 0, 0),
1033         TEST(lgamma_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1034         TEST(lgamma_1, (FLOAT_T) 0.0, 0, 0),
1035         TEST(lgamma_2, (FLOAT_T) 0.0, 0, 0),
1036 	TEST(lgamma_0, (FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1037 	TEST(lgamma_neg0, (FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1038 	TEST(lgamma_neg1, (FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1039 	TEST(lgamma_neg2, (FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1040 	TEST(lgamma_big, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
1041 	TEST(lgamma_negbig, (FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1042 	TEST(lgamma_inf, (FLOAT_T)INFINITY, 0, 0),
1043 	TEST(lgamma_neginf, (FLOAT_T)INFINITY, 0, 0),
1044 
1045         TEST(lgamma_r_qnan, (FLOAT_T)NAN, 0, 0),
1046         TEST(lgamma_r_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1047         TEST(lgamma_r_1, (FLOAT_T) 0.0, 0, 0),
1048         TEST(lgamma_r_2, (FLOAT_T) 0.0, 0, 0),
1049 	TEST(lgamma_r_0, (FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1050 	TEST(lgamma_r_neg0, (FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1051 	TEST(lgamma_r_neg1, (FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1052 	TEST(lgamma_r_neg2, (FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1053 	TEST(lgamma_r_big, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
1054 #if !defined(__PICOLIBC__) && defined(TEST_LONG_DOUBLE) && (defined(__x86_64) || defined(__i386))
1055         /* glibc on x86 gets this wrong */
1056 	TEST(lgamma_r_negbig, (FLOAT_T)INFINITY, FE_DIVBYZERO|FE_OVERFLOW|FE_INEXACT, ERANGE),
1057 #else
1058 	TEST(lgamma_r_negbig, (FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1059 #endif
1060 	TEST(lgamma_r_inf, (FLOAT_T)INFINITY, 0, 0),
1061 	TEST(lgamma_r_neginf, (FLOAT_T)INFINITY, 0, 0),
1062 
1063 	TEST(log_qnan, (FLOAT_T)NAN, 0, 0),
1064 	TEST(log_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1065 	TEST(log_1, (FLOAT_T)0, 0, 0),
1066 	TEST(log_inf, (FLOAT_T)INFINITY, 0, 0),
1067 	TEST(log_0, -(FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1068 	TEST(log_neg, (FLOAT_T)NAN, FE_INVALID, EDOM),
1069 	TEST(log_neginf, (FLOAT_T)NAN, FE_INVALID, EDOM),
1070 
1071 	TEST(log10_qnan, (FLOAT_T)NAN, 0, 0),
1072 	TEST(log10_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1073 	TEST(log10_1, (FLOAT_T)0, 0, 0),
1074 	TEST(log10_inf, (FLOAT_T)INFINITY, 0, 0),
1075 	TEST(log10_0, -(FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1076 	TEST(log10_neg, (FLOAT_T)NAN, FE_INVALID, EDOM),
1077 	TEST(log10_neginf, (FLOAT_T)NAN, FE_INVALID, EDOM),
1078 
1079 	TEST(log1p_qnan, (FLOAT_T)NAN, 0, 0),
1080 	TEST(log1p_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1081 	TEST(log1p_inf, (FLOAT_T)INFINITY, 0, 0),
1082 	TEST(log1p_neginf, (FLOAT_T)NAN, FE_INVALID, EDOM),
1083 	TEST(log1p_neg1, -(FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1084 	TEST(log1p_neg2, (FLOAT_T)NAN, FE_INVALID, EDOM),
1085 
1086 	TEST(log2_qnan, (FLOAT_T)NAN, 0, 0),
1087 	TEST(log2_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1088 	TEST(log2_1, (FLOAT_T)0, 0, 0),
1089 	TEST(log2_inf, (FLOAT_T)INFINITY, 0, 0),
1090 	TEST(log2_0, -(FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1091 	TEST(log2_neg, (FLOAT_T)NAN, FE_INVALID, EDOM),
1092 	TEST(log2_neginf, (FLOAT_T)NAN, FE_INVALID, EDOM),
1093 
1094 #endif
1095 
1096         TEST(logb_qnan, (FLOAT_T)NAN, 0, 0),
1097         TEST(logb_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1098         TEST(logb_0, -(FLOAT_T)INFINITY, FE_DIVBYZERO, 0),
1099         TEST(logb_neg0, -(FLOAT_T)INFINITY, FE_DIVBYZERO, 0),
1100         TEST(logb_inf, (FLOAT_T)INFINITY, 0, 0),
1101         TEST(logb_neginf, (FLOAT_T)INFINITY, 0, 0),
1102 
1103 #ifndef SIMPLE_MATH_ONLY
1104 
1105         TEST(nearbyint_qnan, (FLOAT_T) NAN, 0, 0),
1106         TEST(nearbyint_snan, (FLOAT_T) NAN, FE_INVALID, 0),
1107         TEST(nearbyint_inf, (FLOAT_T)INFINITY, 0, 0),
1108         TEST(nearbyint_neginf, -(FLOAT_T)INFINITY, 0, 0),
1109         TEST(nearbyint_big, BIG, 0, 0),
1110         TEST(nearbyint_negbig, -BIG, 0, 0),
1111         TEST(nearbyint_half, (FLOAT_T)0.0, 0, 0),
1112         TEST(nearbyint_neghalf, (FLOAT_T)-0.0, 0, 0),
1113 
1114 	TEST(pow_neg_half, (FLOAT_T)NAN, FE_INVALID, EDOM),
1115 	TEST(pow_big, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
1116 	TEST(pow_negbig, (FLOAT_T)-INFINITY, FE_OVERFLOW, ERANGE),
1117 	TEST(pow_tiny, (FLOAT_T)0.0, FE_UNDERFLOW, ERANGE),
1118         TEST(pow_1_1, (FLOAT_T)1.0, 0, 0),
1119         TEST(pow_1_2, (FLOAT_T)1.0, 0, 0),
1120         TEST(pow_1_neg2, (FLOAT_T)1.0, 0, 0),
1121         TEST(pow_1_inf, (FLOAT_T)1.0, 0, 0),
1122         TEST(pow_1_neginf, (FLOAT_T)1.0, 0, 0),
1123         TEST(pow_1_qnan, (FLOAT_T)1.0, 0, 0),
1124         TEST(pow_qnan_0, (FLOAT_T)1.0, 0, 0),
1125         TEST(pow_qnan_neg0, (FLOAT_T)1.0, 0, 0),
1126 #ifndef SKIP_SNAN_CHECKS
1127         TEST(pow_1_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1128         TEST(pow_snan_0, (FLOAT_T)NAN, FE_INVALID, 0),
1129         TEST(pow_snan_neg0, (FLOAT_T)NAN, FE_INVALID, 0),
1130 #endif
1131         TEST(pow_1_0, (FLOAT_T)1.0, 0, 0),
1132         TEST(pow_1_neg0, (FLOAT_T)1.0, 0, 0),
1133         TEST(pow_0_0, (FLOAT_T)1.0, 0, 0),
1134         TEST(pow_0_neg0, (FLOAT_T)1.0, 0, 0),
1135         TEST(pow_inf_0, (FLOAT_T)1.0, 0, 0),
1136         TEST(pow_inf_neg0, (FLOAT_T)1.0, 0, 0),
1137         TEST(pow_0_odd, (FLOAT_T)0.0, 0, 0),
1138         TEST(pow_neg0_odd, (FLOAT_T)-0.0, 0, 0),
1139         TEST(pow_neg1_inf, (FLOAT_T)1.0, 0, 0),
1140         TEST(pow_neg1_neginf, (FLOAT_T)1.0, 0, 0),
1141         TEST(pow_half_neginf, (FLOAT_T)INFINITY, 0, 0),
1142         TEST(pow_neghalf_neginf, (FLOAT_T)INFINITY, 0, 0),
1143         TEST(pow_2_neginf, (FLOAT_T)0.0, 0, 0),
1144         TEST(pow_neg2_neginf, (FLOAT_T)0.0, 0, 0),
1145         TEST(pow_half_inf, (FLOAT_T)0.0, 0, 0),
1146         TEST(pow_neghalf_inf, (FLOAT_T)0.0, 0, 0),
1147         TEST(pow_2_inf, (FLOAT_T)INFINITY, 0, 0),
1148         TEST(pow_2_qnan, (FLOAT_T)NAN, 0, 0),
1149         TEST(pow_2_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1150         TEST(pow_neg2_inf, (FLOAT_T)INFINITY, 0, 0),
1151         TEST(pow_neginf_negodd, (FLOAT_T)-0.0, 0, 0),
1152         TEST(pow_neginf_neghalf, (FLOAT_T)0.0, 0, 0),
1153         TEST(pow_neginf_neg2, (FLOAT_T)0.0, 0, 0),
1154         TEST(pow_neginf_odd, (FLOAT_T)-INFINITY, 0, 0),
1155         TEST(pow_neginf_half, (FLOAT_T)INFINITY, 0, 0),
1156         TEST(pow_neginf_2, (FLOAT_T)INFINITY, 0, 0),
1157         TEST(pow_inf_neg2, (FLOAT_T)0.0, 0, 0),
1158         TEST(pow_inf_2, (FLOAT_T)INFINITY, 0, 0),
1159 	TEST(pow_0_neg2, (FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1160 	TEST(pow_neg0_neg2, (FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1161 	TEST(pow_0_neg3, (FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1162 	TEST(pow_neg0_neg3, (FLOAT_T)-INFINITY, FE_DIVBYZERO, ERANGE),
1163 	TEST(pow_negsmall_negbigodd, (FLOAT_T)-INFINITY, FE_OVERFLOW, ERANGE),
1164 	TEST(pow_negbig_bigodd, (FLOAT_T)-INFINITY, FE_OVERFLOW, ERANGE),
1165 	TEST(pow_negsmall_negbigeven, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
1166 	TEST(pow_negbig_bigeven, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
1167 
1168 	TEST(pow10_qnan, (FLOAT_T)NAN, 0, 0),
1169 	TEST(pow10_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1170 	TEST(pow10_inf, (FLOAT_T)INFINITY, 0, 0),
1171 	TEST(pow10_neginf, (FLOAT_T)0.0, 0, 0),
1172 	TEST(pow10_big, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
1173 	TEST(pow10_negbig, (FLOAT_T)0.0, FE_UNDERFLOW, ERANGE),
1174 
1175 	TEST(remainder_0, (FLOAT_T)NAN, FE_INVALID, EDOM),
1176 	TEST(remainder_qnan_1, (FLOAT_T)NAN, 0, 0),
1177 	TEST(remainder_1_qnan, (FLOAT_T)NAN, 0, 0),
1178 	TEST(remainder_snan_1, (FLOAT_T)NAN, FE_INVALID, 0),
1179 	TEST(remainder_1_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1180         TEST(remainder_inf_2, (FLOAT_T)NAN, FE_INVALID, EDOM),
1181         TEST(remainder_inf_0, (FLOAT_T)NAN, FE_INVALID, EDOM),
1182         TEST(remainder_2_0, (FLOAT_T)NAN, FE_INVALID, EDOM),
1183         TEST(remainder_1_2, (FLOAT_T)1.0, 0, 0),
1184         TEST(remainder_neg1_2, -(FLOAT_T)1.0, 0, 0),
1185 #endif
1186 
1187         TEST(rint_qnan, (FLOAT_T) NAN, 0, 0),
1188         TEST(rint_snan, (FLOAT_T) NAN, FE_INVALID, 0),
1189         TEST(rint_inf, (FLOAT_T)INFINITY, 0, 0),
1190         TEST(rint_neginf, -(FLOAT_T)INFINITY, 0, 0),
1191         TEST(rint_big, BIG, 0, 0),
1192         TEST(rint_negbig, -BIG, 0, 0),
1193         TEST(rint_half, (FLOAT_T) 0.0, FE_INEXACT, 0),
1194         TEST(rint_neghalf, (FLOAT_T)-0.0, FE_INEXACT, 0),
1195 
1196         TEST(scalb_1_1, (FLOAT_T)2.0, 0, 0),
1197         TEST(scalb_1_half, (FLOAT_T)NAN, FE_INVALID, EDOM),
1198         TEST(scalb_qnan_1, (FLOAT_T)NAN, 0, 0),
1199         TEST(scalb_1_qnan, (FLOAT_T)NAN, 0, 0),
1200         TEST(scalb_snan_1, (FLOAT_T)NAN, FE_INVALID, 0),
1201         TEST(scalb_1_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1202         TEST(scalb_inf_2, (FLOAT_T)INFINITY, 0, 0),
1203         TEST(scalb_neginf_2, -(FLOAT_T)INFINITY, 0, 0),
1204         TEST(scalb_0_2, (FLOAT_T)0.0, 0, 0),
1205         TEST(scalb_neg0_2, (FLOAT_T)-0.0, 0, 0),
1206         TEST(scalb_0_inf, (FLOAT_T)NAN, FE_INVALID, EDOM),
1207         TEST(scalb_inf_neginf, (FLOAT_T)NAN, FE_INVALID, EDOM),
1208         TEST(scalb_neginf_neginf, (FLOAT_T)NAN, FE_INVALID, EDOM),
1209         TEST(scalb_1_big, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
1210         TEST(scalb_neg1_big, (FLOAT_T)-INFINITY, FE_OVERFLOW, ERANGE),
1211         TEST(scalb_1_negbig, (FLOAT_T)0.0, FE_UNDERFLOW, ERANGE),
1212         TEST(scalb_neg1_negbig, (FLOAT_T)-0.0, FE_UNDERFLOW, ERANGE),
1213         TEST(scalbn_big, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
1214         TEST(scalbn_tiny, (FLOAT_T)0.0, FE_UNDERFLOW, ERANGE),
1215 
1216 #ifndef SIMPLE_MATH_ONLY
1217 
1218         TEST(nextafter_0_neg0, -(FLOAT_T)0, 0, 0),
1219         TEST(nextafter_neg0_0, (FLOAT_T)0, 0, 0),
1220         TEST(nextafter_0_1, (FLOAT_T) MIN_VAL, FE_UNDERFLOW, 0),
1221         TEST(nextafter_0_neg1, -(FLOAT_T) MIN_VAL, FE_UNDERFLOW, 0),
1222         TEST(nextafter_min_1, (FLOAT_T) MIN_VAL + (FLOAT_T) MIN_VAL, FE_UNDERFLOW, ERANGE),
1223         TEST(nextafter_negmin_neg1, -(FLOAT_T) MIN_VAL - (FLOAT_T) MIN_VAL, FE_UNDERFLOW, ERANGE),
1224         TEST(nextafter_qnan_1, (FLOAT_T)NAN, 0, 0),
1225         TEST(nextafter_snan_1, (FLOAT_T)NAN, FE_INVALID, 0),
1226         TEST(nextafter_max_inf, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
1227         TEST(nextafter_negmax_neginf, -(FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
1228         TEST(nextafter_min_0, (FLOAT_T)0, FE_UNDERFLOW, ERANGE),
1229         TEST(nextafter_negmin_0, (FLOAT_T)0, FE_UNDERFLOW, ERANGE),
1230         TEST(nextafter_1_2, (FLOAT_T)1.0 + EPSILON_VAL, 0, 0),
1231         TEST(nextafter_neg1_neg2, -(FLOAT_T)1.0 - EPSILON_VAL, 0, 0),
1232 
1233 #if defined(_TEST_LONG_DOUBLE) && !defined(NO_NEXTTOWARD)
1234         TEST(nexttoward_0_neg0, -(FLOAT_T)0, 0, 0),
1235         TEST(nexttoward_neg0_0, (FLOAT_T)0, 0, 0),
1236         TEST(nexttoward_0_1, (FLOAT_T) MIN_VAL, FE_UNDERFLOW, 0),
1237         TEST(nexttoward_0_neg1, -(FLOAT_T) MIN_VAL, FE_UNDERFLOW, 0),
1238         TEST(nexttoward_min_1, (FLOAT_T) MIN_VAL + (FLOAT_T) MIN_VAL, FE_UNDERFLOW, ERANGE),
1239         TEST(nexttoward_negmin_neg1, -(FLOAT_T) MIN_VAL - (FLOAT_T) MIN_VAL, FE_UNDERFLOW, ERANGE),
1240         TEST(nexttoward_qnan_1, (FLOAT_T)NAN, 0, 0),
1241         TEST(nexttoward_snan_1, (FLOAT_T)NAN, FE_INVALID, 0),
1242         TEST(nexttoward_max_inf, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
1243         TEST(nexttoward_negmax_neginf, -(FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
1244         TEST(nexttoward_min_0, (FLOAT_T)0, FE_UNDERFLOW, ERANGE),
1245         TEST(nexttoward_negmin_0, (FLOAT_T)0, FE_UNDERFLOW, ERANGE),
1246         TEST(nexttoward_1_2, (FLOAT_T)1.0 + EPSILON_VAL, 0, 0),
1247         TEST(nexttoward_neg1_neg2, -(FLOAT_T)1.0 - EPSILON_VAL, 0, 0),
1248 #endif
1249 
1250         TEST(sin_inf, (FLOAT_T)NAN, FE_INVALID, EDOM),
1251         TEST(sin_qnan, (FLOAT_T)NAN, 0, 0),
1252         TEST(sin_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1253         TEST(sin_pio2, (FLOAT_T)1.0, FE_INEXACT, 0),
1254         TEST(sin_small, (FLOAT_T)SMALL, FE_INEXACT, 0),
1255         TEST(sin_0, (FLOAT_T)0.0, 0, 0),
1256 
1257         TEST(sincos, (FLOAT_T)1.0, 0, 0),
1258         TEST(sincos_inf, (FLOAT_T)NAN, FE_INVALID, EDOM),
1259         TEST(sincos_qnan, (FLOAT_T)NAN, 0, 0),
1260         TEST(sincos_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1261 
1262         TEST(sinh_qnan, (FLOAT_T)NAN, 0, 0),
1263         TEST(sinh_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1264         TEST(sinh_0, (FLOAT_T)0.0, 0, 0),
1265         TEST(sinh_neg0, (FLOAT_T)-0.0, 0, 0),
1266         TEST(sinh_inf, (FLOAT_T)INFINITY, 0, 0),
1267         TEST(sinh_neginf, (FLOAT_T)-INFINITY, 0, 0),
1268 
1269 #endif
1270 
1271 	TEST(sqrt_qnan, (FLOAT_T)NAN, 0, 0),
1272 	TEST(sqrt_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1273         TEST(sqrt_0, (FLOAT_T)0.0, 0, 0),
1274         TEST(sqrt_neg0, (FLOAT_T)-0.0, 0, 0),
1275         TEST(sqrt_inf, (FLOAT_T)INFINITY, 0, 0),
1276         TEST(sqrt_neginf, (FLOAT_T)NAN, FE_INVALID, EDOM),
1277 	TEST(sqrt_neg, (FLOAT_T)NAN, FE_INVALID, EDOM),
1278         /*
1279          * Picolibc doesn't ever set inexact for sqrt as that's
1280          * an expensive operation
1281          */
1282 //	TEST(sqrt_2, (FLOAT_T)1.4142135623730951, FE_INEXACT, 0),
1283 
1284 #ifndef SIMPLE_MATH_ONLY
1285 
1286         TEST(tan_qnan, (FLOAT_T)NAN, 0, 0),
1287         TEST(tan_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1288         TEST(tan_inf, (FLOAT_T)NAN, FE_INVALID, EDOM),
1289         TEST(tan_neginf, (FLOAT_T)NAN, FE_INVALID, EDOM),
1290 #if 0
1291         /* alas, we aren't close enough to π/2 to overflow */
1292         TEST(tan_pio2, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
1293 #endif
1294 
1295         TEST(tanh_qnan, (FLOAT_T)NAN, 0, 0),
1296         TEST(tanh_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1297         TEST(tanh_0, (FLOAT_T)0.0, 0, 0),
1298         TEST(tanh_neg0, (FLOAT_T)-0.0, 0, 0),
1299         TEST(tanh_inf, (FLOAT_T)1.0, 0, 0),
1300         TEST(tanh_neginf, (FLOAT_T)-1.0, 0, 0),
1301 
1302 	TEST(tgamma_0, (FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1303 	TEST(tgamma_neg0, -(FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1304 	TEST(tgamma_neg1, (FLOAT_T)NAN, FE_INVALID, EDOM),
1305 	TEST(tgamma_big, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
1306 	TEST(tgamma_negbig, (FLOAT_T)NAN, FE_INVALID, EDOM),
1307 	TEST(tgamma_inf, (FLOAT_T)INFINITY, 0, 0),
1308 	TEST(tgamma_neginf, (FLOAT_T)NAN, FE_INVALID, EDOM),
1309 	TEST(tgamma_qnan, (FLOAT_T)NAN, 0, 0),
1310 	TEST(tgamma_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1311         /* ld128 tgamma sits atop lgamma which is not accurate for this value */
1312 #if defined(__PICOLIBC__) && defined(TEST_LONG_DOUBLE) && __LDBL_MANT_DIG__ == 113
1313 #else
1314 	TEST(tgamma_small, (FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
1315 	TEST(tgamma_negsmall, -(FLOAT_T)INFINITY, FE_OVERFLOW, ERANGE),
1316 #endif
1317 
1318 #ifndef NO_BESSEL_TESTS
1319         TEST(y0_inf, (FLOAT_T)0.0, 0, 0),
1320         TEST(y0_qnan, (FLOAT_T)NAN, 0, 0),
1321         TEST(y0_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1322 	TEST(y0_0, -(FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1323 	TEST(y0_neg, (FLOAT_T)NAN, FE_INVALID, EDOM),
1324 
1325         TEST(y1_inf, (FLOAT_T)0.0, 0, 0),
1326         TEST(y1_qnan, (FLOAT_T)NAN, 0, 0),
1327         TEST(y1_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1328 	TEST(y1_0, -(FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1329 	TEST(y1_neg, (FLOAT_T)NAN, FE_INVALID, EDOM),
1330 
1331 	TEST(yn_inf, (FLOAT_T)0.0, 0, 0),
1332 	TEST(yn_qnan, (FLOAT_T)NAN, 0, 0),
1333 	TEST(yn_snan, (FLOAT_T)NAN, FE_INVALID, 0),
1334 	TEST(yn_0, -(FLOAT_T)INFINITY, FE_DIVBYZERO, ERANGE),
1335 	TEST(yn_neg, (FLOAT_T)NAN, FE_INVALID, EDOM),
1336 #endif
1337 #endif
1338 
1339 	{ 0 },
1340 };
1341 
1342 static const struct {
1343         long long       (*func)(void);
1344 	char	        *name;
1345 	long long       value;
1346 	int	        except;
1347 	int	        errno_expect;
1348 } makemathname(itests)[] = {
1349         TEST(fpclassify_snan, FP_NAN, 0, 0),
1350         TEST(fpclassify_nan, FP_NAN, 0, 0),
1351         TEST(fpclassify_inf, FP_INFINITE, 0, 0),
1352         TEST(fpclassify_neginf, FP_INFINITE, 0, 0),
1353         TEST(fpclassify_zero, FP_ZERO, 0, 0),
1354         TEST(fpclassify_negzero, FP_ZERO, 0, 0),
1355         TEST(fpclassify_small, FP_SUBNORMAL, 0, 0),
1356         TEST(fpclassify_negsmall, FP_SUBNORMAL, 0, 0),
1357         TEST(fpclassify_two, FP_NORMAL, 0, 0),
1358         TEST(fpclassify_negtwo, FP_NORMAL, 0, 0),
1359 
1360         TEST(isfinite_snan, 0, 0, 0),
1361         TEST(isfinite_nan, 0, 0, 0),
1362         TEST(isfinite_inf, 0, 0, 0),
1363         TEST(isfinite_neginf, 0, 0, 0),
1364         TEST(isfinite_zero, 1, 0, 0),
1365         TEST(isfinite_negzero, 1, 0, 0),
1366         TEST(isfinite_small, 1, 0, 0),
1367         TEST(isfinite_negsmall, 1, 0, 0),
1368         TEST(isfinite_two, 1, 0, 0),
1369         TEST(isfinite_negtwo, 1, 0, 0),
1370 
1371         TEST(isnormal_snan, 0, 0, 0),
1372         TEST(isnormal_nan, 0, 0, 0),
1373         TEST(isnormal_inf, 0, 0, 0),
1374         TEST(isnormal_neginf, 0, 0, 0),
1375         TEST(isnormal_zero, 0, 0, 0),
1376         TEST(isnormal_negzero, 0, 0, 0),
1377         TEST(isnormal_small, 0, 0, 0),
1378         TEST(isnormal_negsmall, 0, 0, 0),
1379         TEST(isnormal_two, 1, 0, 0),
1380         TEST(isnormal_negtwo, 1, 0, 0),
1381 
1382         TEST(isnan_snan, 1, 0, 0),
1383         TEST(isnan_nan, 1, 0, 0),
1384         TEST(isnan_inf, 0, 0, 0),
1385         TEST(isnan_neginf, 0, 0, 0),
1386         TEST(isnan_zero, 0, 0, 0),
1387         TEST(isnan_negzero, 0, 0, 0),
1388         TEST(isnan_small, 0, 0, 0),
1389         TEST(isnan_negsmall, 0, 0, 0),
1390         TEST(isnan_two, 0, 0, 0),
1391         TEST(isnan_negtwo, 0, 0, 0),
1392 
1393         TEST(isinf_snan, 0, 0, 0),
1394         TEST(isinf_nan, 0, 0, 0),
1395         TEST(isinf_inf, 1, 0, 0),
1396         TEST(isinf_neginf, 1, 0, 0),
1397         TEST(isinf_zero, 0, 0, 0),
1398         TEST(isinf_negzero, 0, 0, 0),
1399         TEST(isinf_small, 0, 0, 0),
1400         TEST(isinf_negsmall, 0, 0, 0),
1401         TEST(isinf_two, 0, 0, 0),
1402         TEST(isinf_negtwo, 0, 0, 0),
1403 
1404         TEST(ilogb_0, FP_ILOGB0, FE_INVALID, EDOM),
1405         TEST(ilogb_qnan, FP_ILOGBNAN, FE_INVALID, EDOM),
1406         TEST(ilogb_inf, INT_MAX, FE_INVALID, EDOM),
1407         TEST(ilogb_neginf, INT_MAX, FE_INVALID, EDOM),
1408 
1409         TEST(lrint_zero, 0, 0, 0),
1410         TEST(lrint_negzero, 0, 0, 0),
1411         TEST(lrint_qnan, 0, FE_INVALID, 0),
1412         TEST(lrint_inf, 0, FE_INVALID, 0),
1413         TEST(lrint_neginf, 0, FE_INVALID, 0),
1414         TEST(lrint_big, 0, FE_INVALID, 0),
1415         TEST(lrint_negbig, 0, FE_INVALID, 0),
1416         TEST(lrint_long_max_mask, FLOAT_LONG_MAX, 0, 0),
1417         TEST(lrint_long_min_mask, FLOAT_LONG_MIN, 0, 0),
1418         TEST(lrint_long_max_one, LROUND_LONG_MAX, FE_INVALID, 0),
1419         TEST(lrint_long_min_one, LONG_MIN, FE_INVALID, 0),
1420 
1421         TEST(llrint_qnan, 0, FE_INVALID, 0),
1422         TEST(llrint_inf, 0, FE_INVALID, 0),
1423         TEST(llrint_neginf, 0, FE_INVALID, 0),
1424         TEST(llrint_big, 0, FE_INVALID, 0),
1425         TEST(llrint_negbig, 0, FE_INVALID, 0),
1426         TEST(llrint_long_long_max_mask, FLOAT_LONG_LONG_MAX, 0, 0),
1427         TEST(llrint_long_long_min_mask, FLOAT_LONG_LONG_MIN, 0, 0),
1428         TEST(llrint_long_long_max_one, LROUND_LLONG_MAX, FE_INVALID, 0),
1429         TEST(llrint_long_long_min_one, LLONG_MIN, FE_INVALID, 0),
1430 
1431         TEST(lround_qnan, 0, FE_INVALID, 0),
1432         TEST(lround_inf, 0, FE_INVALID, 0),
1433         TEST(lround_neginf, 0, FE_INVALID, 0),
1434         TEST(lround_big, 0, FE_INVALID, 0),
1435         TEST(lround_negbig, 0, FE_INVALID, 0),
1436         TEST(lround_long_max_mask, FLOAT_LONG_MAX, 0, 0),
1437         TEST(lround_long_min_mask, FLOAT_LONG_MIN, 0, 0),
1438         TEST(lround_long_max_one, LROUND_LONG_MAX, FE_INVALID, 0),
1439         TEST(lround_long_min_one, LONG_MIN, FE_INVALID, 0),
1440 
1441         TEST(llround_qnan, 0, FE_INVALID, 0),
1442         TEST(llround_inf, 0, FE_INVALID, 0),
1443         TEST(llround_neginf, 0, FE_INVALID, 0),
1444         TEST(llround_big, 0, FE_INVALID, 0),
1445         TEST(llround_negbig, 0, FE_INVALID, 0),
1446         TEST(llround_long_long_max_mask, FLOAT_LONG_LONG_MAX, 0, 0),
1447         TEST(llround_long_long_min_mask, FLOAT_LONG_LONG_MIN, 0, 0),
1448         TEST(llround_long_long_max_one, LROUND_LLONG_MAX, FE_INVALID, 0),
1449         TEST(llround_long_long_min_one, LLONG_MIN, FE_INVALID, 0),
1450         { 0 },
1451 };
1452 
1453 #if defined(TINY_STDIO) || !defined(NO_FLOATING_POINT)
1454 #define PRINT	if (!printed++) printf("    %-30.30s = %g errno %d (%s) except %s\n", \
1455                        makemathname(tests)[t].name, (double) v, err, strerror(err), e_to_str(except))
1456 #else
1457 #define PRINT	if (!printed++) printf("    %-30.30s = (float) errno %d (%s) except %s\n", \
1458                        makemathname(tests)[t].name, err, strerror(err), e_to_str(except))
1459 #endif
1460 
1461 #define IPRINT	if (!printed++) printf("    %-30.30s = %lld errno %d (%s) except %s\n", \
1462                        makemathname(itests)[t].name, iv, err, strerror(err), e_to_str(except))
1463 
1464 int
makemathname(is_equal)1465 makemathname(is_equal)(FLOAT_T a, FLOAT_T b)
1466 {
1467     if (isinf(a) && isinf(b))
1468         return (a > 0) == (b > 0);
1469     if (makemathname(isnan)(a) && makemathname(isnan)(b))
1470         return issignaling(a) == issignaling(b);
1471     return a == b;
1472 }
1473 
1474 void
makemathname(print_float)1475 makemathname(print_float)(FLOAT_T a)
1476 {
1477     if (makemathname(isnan)(a)) {
1478         if (issignaling(a))
1479             printf("sNaN");
1480         else
1481             printf("qNaN");
1482     } else
1483 #if defined(TEST_LONG_DOUBLE) && !defined(__PICOLIBC__)
1484         printf("%.34g", (long double) a);
1485 #else
1486         printf("%.17g", (double) a);
1487 #endif
1488 }
1489 
1490 static volatile const FLOAT_T makemathname(except_zero) = (FLOAT_T) 0.0;
1491 static volatile const FLOAT_T makemathname(except_one) = (FLOAT_T) 1.0;
1492 static volatile const FLOAT_T makemathname(except_small) = SMALL;
1493 static volatile const FLOAT_T makemathname(except_big) = BIG;
1494 static volatile FLOAT_T makemathname(except_result);
1495 
makemathname(has_invalid)1496 static bool makemathname(has_invalid)(void)
1497 {
1498         int except;
1499         feclearexcept(FE_ALL_EXCEPT);
1500         makemathname(except_result) = force_eval(makemathname(except_zero) / makemathname(except_zero));
1501         except = fetestexcept(FE_INVALID);
1502         return except != 0;
1503 }
1504 
makemathname(has_inf)1505 static bool makemathname(has_inf)(void)
1506 {
1507         int except;
1508         feclearexcept(FE_ALL_EXCEPT);
1509         makemathname(except_result) = force_eval(makemathname(except_one) / makemathname(except_zero));
1510         except = fetestexcept(FE_DIVBYZERO);
1511         return except != 0;
1512 }
1513 
makemathname(has_uflow)1514 static bool makemathname(has_uflow)(void)
1515 {
1516         int except;
1517         feclearexcept(FE_ALL_EXCEPT);
1518         makemathname(except_result) = force_eval(makemathname(except_small) * makemathname(except_small));
1519         except = fetestexcept(FE_UNDERFLOW);
1520         return except != 0;
1521 }
1522 
makemathname(has_oflow)1523 static bool makemathname(has_oflow)(void)
1524 {
1525         int except;
1526         feclearexcept(FE_ALL_EXCEPT);
1527         makemathname(except_result) = force_eval(makemathname(except_big) * makemathname(except_big));
1528         except = fetestexcept(FE_OVERFLOW);
1529         return except != 0;
1530 }
1531 
makemathname(check_except)1532 static bool makemathname(check_except)(void)
1533 {
1534         bool result = true;
1535         if (FE_INVALID != 0) {
1536                 if (EXCEPTION_TEST) {
1537                         if (!makemathname(has_invalid)()) {
1538                                 printf("Exceptions claim to be supported, but 0/0 doesn't raise FE_INVALID\n");
1539                                 result = false;
1540                         }
1541                 } else {
1542                         if (makemathname(has_invalid)()) {
1543                                 printf("Exceptions are not supposed to be supported, but 0/0 raises FE_INVALID\n");
1544                                 result = false;
1545                         }
1546                 }
1547         }
1548         if (FE_DIVBYZERO != 0) {
1549                 if (EXCEPTION_TEST) {
1550                         if (!makemathname(has_inf)()) {
1551                                 printf("Exceptions claim to be supported, but 1/0 doesn't raise FE_DIVBYZERO\n");
1552                                 result = false;
1553                         }
1554                 } else {
1555                         if (makemathname(has_inf)()) {
1556                                 printf("Exceptions are not supposed to be supported, but 1/0 raises FE_DIVBYZERO\n");
1557                                 result = false;
1558                         }
1559                 }
1560         }
1561         if (FE_UNDERFLOW != 0) {
1562                 if (EXCEPTION_TEST) {
1563                         if (!makemathname(has_uflow)()) {
1564                                 printf("Exceptions claim to be supported, but %g*%g doesn't raise FE_UNDERFLOW\n",
1565                                        (double) makemathname(except_small), (double) makemathname(except_small));
1566                                 result = false;
1567                         }
1568                 } else {
1569                         if (makemathname(has_uflow)()) {
1570                                 printf("Exceptions are not supposed to be supported, but %g*%g raises FE_UNDERFLOW\n",
1571                                        (double) makemathname(except_small), (double)makemathname(except_small));
1572                                 result = false;
1573                         }
1574                 }
1575         }
1576         if (FE_OVERFLOW != 0) {
1577                 if (EXCEPTION_TEST) {
1578                         if (!makemathname(has_oflow)()) {
1579                                 printf("Exceptions claim to be supported, but %g*%g doesn't raise FE_OVERFLOW\n",
1580                                        (double) makemathname(except_big), (double) makemathname(except_big));
1581                                 result = false;
1582                         }
1583                 } else {
1584                         if (makemathname(has_oflow)()) {
1585                                 printf("Exceptions are not supposed to be supported, but %g*%g raises FE_OVERFLOW\n",
1586                                        (double) makemathname(except_big), (double) makemathname(except_big));
1587                                 result = false;
1588                         }
1589                 }
1590         }
1591         return result;
1592 }
1593 
1594 int
makemathname(run_tests)1595 makemathname(run_tests)(void) {
1596 	int result = 0;
1597 	volatile FLOAT_T v;
1598         volatile long long iv;
1599 	int err, except;
1600 	int t;
1601         int printed;
1602 
1603         if (!makemathname(check_except)())
1604                 result++;
1605 
1606 	for (t = 0; makemathname(tests)[t].func; t++) {
1607                 printed = 0;
1608 		errno = 0;
1609 		feclearexcept(FE_ALL_EXCEPT);
1610 		v = makemathname(tests)[t].func();
1611 		err = errno;
1612 		except = fetestexcept(MY_EXCEPT);
1613 		if (!makemathname(is_equal)(v, makemathname(tests)[t].value))
1614 		{
1615                         PRINT;
1616 			printf("\tbad value got ");
1617                         makemathname(print_float)(v);
1618                         printf(" expect ");
1619                         makemathname(print_float)(makemathname(tests)[t].value);
1620                         printf("\n");
1621 			++result;
1622 		}
1623 		if (math_errhandling & EXCEPTION_TEST) {
1624                     int expect_except = makemathname(tests)[t].except;
1625                     int mask = MY_EXCEPT;
1626 
1627                     /* underflow can be set for inexact operations */
1628                     if (expect_except & FE_INEXACT)
1629                         mask &= ~FE_UNDERFLOW;
1630                     else
1631                         mask &= ~FE_INEXACT;
1632 
1633                     if ((except & (expect_except | mask)) != expect_except) {
1634                                 PRINT;
1635 				printf("\texceptions supported. %s returns %s instead of %s\n",
1636                                        makemathname(tests)[t].name, e_to_str(except), e_to_str(makemathname(tests)[t].except));
1637 				++result;
1638 			}
1639 		} else {
1640 			if (except) {
1641                                 PRINT;
1642 				printf("\texceptions not supported. %s returns %s\n", makemathname(tests)[t].name, e_to_str(except));
1643 				++result;
1644 			}
1645 		}
1646 		if (math_errhandling & MATH_ERRNO) {
1647 			if (err != makemathname(tests)[t].errno_expect) {
1648                                 PRINT;
1649 				printf("\terrno supported but %s returns %d (%s) instead of %d (%s)\n",
1650                                        makemathname(tests)[t].name, err, strerror(err),
1651                                        makemathname(tests)[t].errno_expect, strerror(makemathname(tests)[t].errno_expect));
1652 				++result;
1653 			}
1654 		} else {
1655 			if (err != 0) {
1656                                 PRINT;
1657 				printf("\terrno not supported but %s returns %d (%s)\n",
1658                                        makemathname(tests)[t].name, err, strerror(err));
1659 				++result;
1660 			}
1661 		}
1662 	}
1663 
1664 	for (t = 0; makemathname(itests)[t].func; t++) {
1665                 printed = 0;
1666 		errno = 0;
1667 		feclearexcept(FE_ALL_EXCEPT);
1668 		iv = makemathname(itests)[t].func();
1669 		err = errno;
1670 		except = fetestexcept(MY_EXCEPT);
1671 		if (iv != makemathname(itests)[t].value)
1672 		{
1673                         IPRINT;
1674 			printf("\tbad value got %lld expect %lld\n", iv, makemathname(itests)[t].value);
1675 			++result;
1676 		}
1677 		if (math_errhandling & EXCEPTION_TEST) {
1678                         int expect_except = makemathname(itests)[t].except;
1679                         int mask = MY_EXCEPT;
1680 
1681                         /* underflow can be set for inexact operations */
1682                         if (expect_except & FE_INEXACT)
1683                                 mask &= ~FE_UNDERFLOW;
1684                         else
1685                                 mask &= ~FE_INEXACT;
1686 
1687                         if ((except & (expect_except | mask)) != expect_except) {
1688                                 IPRINT;
1689 				printf("\texceptions supported. %s returns %s instead of %s\n",
1690                                        makemathname(itests)[t].name, e_to_str(except), e_to_str(makemathname(itests)[t].except));
1691 				++result;
1692 			}
1693 		} else {
1694 			if (except) {
1695                                 IPRINT;
1696 				printf("\texceptions not supported. %s returns %s\n", makemathname(itests)[t].name, e_to_str(except));
1697 				++result;
1698 			}
1699 		}
1700 		if (math_errhandling & MATH_ERRNO) {
1701 			if (err != makemathname(itests)[t].errno_expect) {
1702                                 IPRINT;
1703 				printf("\terrno supported but %s returns %d (%s)\n", makemathname(itests)[t].name, err, strerror(err));
1704 				++result;
1705 			}
1706 		} else {
1707 			if (err != 0) {
1708                                 IPRINT;
1709 				printf("\terrno not supported but %s returns %d (%s)\n", makemathname(itests)[t].name, err, strerror(err));
1710 				++result;
1711 			}
1712 		}
1713 	}
1714 	return result;
1715 }
1716