1 /* Entry points to finite-math-only compiler runs.
2 Copyright (C) 2011-2013 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
20 # error "Never use <bits/math-finite.h> directly; include <math.h> instead."
24 extern double __REDIRECT_NTH (acos
, (double), __acos_finite
);
25 extern float __REDIRECT_NTH (acosf
, (float), __acosf_finite
);
26 #ifdef __MATH_DECLARE_LDOUBLE
27 # ifdef __NO_LONG_DOUBLE_MATH
28 extern long double __REDIRECT_NTH (acosl
, (long double), __acos_finite
);
30 extern long double __REDIRECT_NTH (acosl
, (long double), __acosl_finite
);
34 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
36 extern double __REDIRECT_NTH (acosh
, (double), __acosh_finite
);
37 extern float __REDIRECT_NTH (acoshf
, (float), __acoshf_finite
);
38 # ifdef __MATH_DECLARE_LDOUBLE
39 # ifdef __NO_LONG_DOUBLE_MATH
40 extern long double __REDIRECT_NTH (acoshl
, (long double), __acosh_finite
);
42 extern long double __REDIRECT_NTH (acoshl
, (long double), __acoshl_finite
);
48 extern double __REDIRECT_NTH (asin
, (double), __asin_finite
);
49 extern float __REDIRECT_NTH (asinf
, (float), __asinf_finite
);
50 #ifdef __MATH_DECLARE_LDOUBLE
51 # ifdef __NO_LONG_DOUBLE_MATH
52 extern long double __REDIRECT_NTH (asinl
, (long double), __asin_finite
);
54 extern long double __REDIRECT_NTH (asinl
, (long double), __asinl_finite
);
59 extern double __REDIRECT_NTH (atan2
, (double, double), __atan2_finite
);
60 extern float __REDIRECT_NTH (atan2f
, (float, float), __atan2f_finite
);
61 #ifdef __MATH_DECLARE_LDOUBLE
62 # ifdef __NO_LONG_DOUBLE_MATH
63 extern long double __REDIRECT_NTH (atan2l
, (long double, long double),
66 extern long double __REDIRECT_NTH (atan2l
, (long double, long double),
71 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
73 extern double __REDIRECT_NTH (atanh
, (double), __atanh_finite
);
74 extern float __REDIRECT_NTH (atanhf
, (float), __atanhf_finite
);
75 # ifdef __MATH_DECLARE_LDOUBLE
76 # ifdef __NO_LONG_DOUBLE_MATH
77 extern long double __REDIRECT_NTH (atanhl
, (long double), __atanh_finite
);
79 extern long double __REDIRECT_NTH (atanhl
, (long double), __atanhl_finite
);
85 extern double __REDIRECT_NTH (cosh
, (double), __cosh_finite
);
86 extern float __REDIRECT_NTH (coshf
, (float), __coshf_finite
);
87 #ifdef __MATH_DECLARE_LDOUBLE
88 # ifdef __NO_LONG_DOUBLE_MATH
89 extern long double __REDIRECT_NTH (coshl
, (long double), __cosh_finite
);
91 extern long double __REDIRECT_NTH (coshl
, (long double), __coshl_finite
);
96 extern double __REDIRECT_NTH (exp
, (double), __exp_finite
);
97 extern float __REDIRECT_NTH (expf
, (float), __expf_finite
);
98 #ifdef __MATH_DECLARE_LDOUBLE
99 # ifdef __NO_LONG_DOUBLE_MATH
100 extern long double __REDIRECT_NTH (expl
, (long double), __exp_finite
);
102 extern long double __REDIRECT_NTH (expl
, (long double), __expl_finite
);
108 extern double __REDIRECT_NTH (exp10
, (double), __exp10_finite
);
109 extern float __REDIRECT_NTH (exp10f
, (float), __exp10f_finite
);
110 # ifdef __MATH_DECLARE_LDOUBLE
111 # ifdef __NO_LONG_DOUBLE_MATH
112 extern long double __REDIRECT_NTH (exp10l
, (long double), __exp10_finite
);
114 extern long double __REDIRECT_NTH (exp10l
, (long double), __exp10l_finite
);
119 extern double __REDIRECT_NTH (pow10
, (double), __exp10_finite
);
120 extern float __REDIRECT_NTH (pow10f
, (float), __exp10f_finite
);
121 # ifdef __MATH_DECLARE_LDOUBLE
122 # ifdef __NO_LONG_DOUBLE_MATH
123 extern long double __REDIRECT_NTH (pow10l
, (long double), __exp10_finite
);
125 extern long double __REDIRECT_NTH (pow10l
, (long double), __exp10l_finite
);
132 extern double __REDIRECT_NTH (exp2
, (double), __exp2_finite
);
133 extern float __REDIRECT_NTH (exp2f
, (float), __exp2f_finite
);
134 # ifdef __MATH_DECLARE_LDOUBLE
135 # ifdef __NO_LONG_DOUBLE_MATH
136 extern long double __REDIRECT_NTH (exp2l
, (long double), __exp2_finite
);
138 extern long double __REDIRECT_NTH (exp2l
, (long double), __exp2l_finite
);
144 extern double __REDIRECT_NTH (fmod
, (double, double), __fmod_finite
);
145 extern float __REDIRECT_NTH (fmodf
, (float, float), __fmodf_finite
);
146 #ifdef __MATH_DECLARE_LDOUBLE
147 # ifdef __NO_LONG_DOUBLE_MATH
148 extern long double __REDIRECT_NTH (fmodl
, (long double, long double),
151 extern long double __REDIRECT_NTH (fmodl
, (long double, long double),
158 extern double __REDIRECT_NTH (hypot
, (double, double), __hypot_finite
);
159 extern float __REDIRECT_NTH (hypotf
, (float, float), __hypotf_finite
);
160 # ifdef __MATH_DECLARE_LDOUBLE
161 # ifdef __NO_LONG_DOUBLE_MATH
162 extern long double __REDIRECT_NTH (hypotl
, (long double, long double),
165 extern long double __REDIRECT_NTH (hypotl
, (long double, long double),
171 #if defined __USE_MISC || defined __USE_XOPEN
173 extern double __REDIRECT_NTH (j0
, (double), __j0_finite
);
174 extern float __REDIRECT_NTH (j0f
, (float), __j0f_finite
);
175 # ifdef __MATH_DECLARE_LDOUBLE
176 # ifdef __NO_LONG_DOUBLE_MATH
177 extern long double __REDIRECT_NTH (j0l
, (long double), __j0_finite
);
179 extern long double __REDIRECT_NTH (j0l
, (long double), __j0l_finite
);
184 extern double __REDIRECT_NTH (y0
, (double), __y0_finite
);
185 extern float __REDIRECT_NTH (y0f
, (float), __y0f_finite
);
186 # ifdef __MATH_DECLARE_LDOUBLE
187 # ifdef __NO_LONG_DOUBLE_MATH
188 extern long double __REDIRECT_NTH (y0l
, (long double), __y0_finite
);
190 extern long double __REDIRECT_NTH (y0l
, (long double), __y0l_finite
);
195 extern double __REDIRECT_NTH (j1
, (double), __j1_finite
);
196 extern float __REDIRECT_NTH (j1f
, (float), __j1f_finite
);
197 # ifdef __MATH_DECLARE_LDOUBLE
198 # ifdef __NO_LONG_DOUBLE_MATH
199 extern long double __REDIRECT_NTH (j1l
, (long double), __j1_finite
);
201 extern long double __REDIRECT_NTH (j1l
, (long double), __j1l_finite
);
206 extern double __REDIRECT_NTH (y1
, (double), __y1_finite
);
207 extern float __REDIRECT_NTH (y1f
, (float), __y1f_finite
);
208 # ifdef __MATH_DECLARE_LDOUBLE
209 # ifdef __NO_LONG_DOUBLE_MATH
210 extern long double __REDIRECT_NTH (y1l
, (long double), __y1_finite
);
212 extern long double __REDIRECT_NTH (y1l
, (long double), __y1l_finite
);
217 extern double __REDIRECT_NTH (jn
, (int, double), __jn_finite
);
218 extern float __REDIRECT_NTH (jnf
, (int, float), __jnf_finite
);
219 # ifdef __MATH_DECLARE_LDOUBLE
220 # ifdef __NO_LONG_DOUBLE_MATH
221 extern long double __REDIRECT_NTH (jnl
, (int, long double), __jn_finite
);
223 extern long double __REDIRECT_NTH (jnl
, (int, long double), __jnl_finite
);
228 extern double __REDIRECT_NTH (yn
, (int, double), __yn_finite
);
229 extern float __REDIRECT_NTH (ynf
, (int, float), __ynf_finite
);
230 # ifdef __MATH_DECLARE_LDOUBLE
231 # ifdef __NO_LONG_DOUBLE_MATH
232 extern long double __REDIRECT_NTH (ynl
, (int, long double), __yn_finite
);
234 extern long double __REDIRECT_NTH (ynl
, (int, long double), __ynl_finite
);
241 extern double __REDIRECT_NTH (lgamma_r
, (double, int *), __lgamma_r_finite
);
242 extern float __REDIRECT_NTH (lgammaf_r
, (float, int *), __lgammaf_r_finite
);
243 # ifdef __MATH_DECLARE_LDOUBLE
244 # ifdef __NO_LONG_DOUBLE_MATH
245 extern long double __REDIRECT_NTH (lgammal_r
, (long double, int *),
248 extern long double __REDIRECT_NTH (lgammal_r
, (long double, int *),
254 #if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99
256 __extern_always_inline
double __NTH (lgamma (double __d
))
259 int __local_signgam
= 0;
260 return lgamma_r (__d
, &__local_signgam
);
262 return lgamma_r (__d
, &signgam
);
265 __extern_always_inline
float __NTH (lgammaf (float __d
))
268 int __local_signgam
= 0;
269 return lgammaf_r (__d
, &__local_signgam
);
271 return lgammaf_r (__d
, &signgam
);
274 # ifdef __MATH_DECLARE_LDOUBLE
275 __extern_always_inline
long double __NTH (lgammal (long double __d
))
278 int __local_signgam
= 0;
279 return lgammal_r (__d
, &__local_signgam
);
281 return lgammal_r (__d
, &signgam
);
287 #if defined __USE_MISC || defined __USE_XOPEN
289 __extern_always_inline
double __NTH (gamma (double __d
))
292 int __local_signgam
= 0;
293 return lgamma_r (__d
, &__local_signgam
);
295 return lgamma_r (__d
, &signgam
);
298 __extern_always_inline
float __NTH (gammaf (float __d
))
301 int __local_signgam
= 0;
302 return lgammaf_r (__d
, &__local_signgam
);
304 return lgammaf_r (__d
, &signgam
);
307 # ifdef __MATH_DECLARE_LDOUBLE
308 __extern_always_inline
long double __NTH (gammal (long double __d
))
311 int __local_signgam
= 0;
312 return lgammal_r (__d
, &__local_signgam
);
314 return lgammal_r (__d
, &signgam
);
321 extern double __REDIRECT_NTH (log
, (double), __log_finite
);
322 extern float __REDIRECT_NTH (logf
, (float), __logf_finite
);
323 #ifdef __MATH_DECLARE_LDOUBLE
324 # ifdef __NO_LONG_DOUBLE_MATH
325 extern long double __REDIRECT_NTH (logl
, (long double), __log_finite
);
327 extern long double __REDIRECT_NTH (logl
, (long double), __logl_finite
);
332 extern double __REDIRECT_NTH (log10
, (double), __log10_finite
);
333 extern float __REDIRECT_NTH (log10f
, (float), __log10f_finite
);
334 #ifdef __MATH_DECLARE_LDOUBLE
335 # ifdef __NO_LONG_DOUBLE_MATH
336 extern long double __REDIRECT_NTH (log10l
, (long double), __log10_finite
);
338 extern long double __REDIRECT_NTH (log10l
, (long double), __log10l_finite
);
344 extern double __REDIRECT_NTH (log2
, (double), __log2_finite
);
345 extern float __REDIRECT_NTH (log2f
, (float), __log2f_finite
);
346 # ifdef __MATH_DECLARE_LDOUBLE
347 # ifdef __NO_LONG_DOUBLE_MATH
348 extern long double __REDIRECT_NTH (log2l
, (long double), __log2_finite
);
350 extern long double __REDIRECT_NTH (log2l
, (long double), __log2l_finite
);
356 extern double __REDIRECT_NTH (ldexp
, (double, int), scalbn
);
357 extern float __REDIRECT_NTH (ldexpf
, (float, int), scalbnf
);
358 #ifdef __MATH_DECLARE_LDOUBLE
359 extern long double __REDIRECT_NTH (ldexpl
, (long double, int), scalbnl
);
363 extern double __REDIRECT_NTH (pow
, (double, double), __pow_finite
);
364 extern float __REDIRECT_NTH (powf
, (float, float), __powf_finite
);
365 #ifdef __MATH_DECLARE_LDOUBLE
366 # ifdef __NO_LONG_DOUBLE_MATH
367 extern long double __REDIRECT_NTH (powl
, (long double, long double),
370 extern long double __REDIRECT_NTH (powl
, (long double, long double),
376 extern double __REDIRECT_NTH (remainder
, (double, double), __remainder_finite
);
377 extern float __REDIRECT_NTH (remainderf
, (float, float), __remainderf_finite
);
378 #ifdef __MATH_DECLARE_LDOUBLE
379 # ifdef __NO_LONG_DOUBLE_MATH
380 extern long double __REDIRECT_NTH (remainderl
, (long double, long double),
383 extern long double __REDIRECT_NTH (remainderl
, (long double, long double),
384 __remainderl_finite
);
388 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
390 extern double __REDIRECT_NTH (scalb
, (double, double), __scalb_finite
);
391 extern float __REDIRECT_NTH (scalbf
, (float, float), __scalbf_finite
);
392 # ifdef __MATH_DECLARE_LDOUBLE
393 # ifdef __NO_LONG_DOUBLE_MATH
394 extern long double __REDIRECT_NTH (scalbl
, (long double, long double),
397 extern long double __REDIRECT_NTH (scalbl
, (long double, long double),
404 extern double __REDIRECT_NTH (sinh
, (double), __sinh_finite
);
405 extern float __REDIRECT_NTH (sinhf
, (float), __sinhf_finite
);
406 #ifdef __MATH_DECLARE_LDOUBLE
407 # ifdef __NO_LONG_DOUBLE_MATH
408 extern long double __REDIRECT_NTH (sinhl
, (long double), __sinh_finite
);
410 extern long double __REDIRECT_NTH (sinhl
, (long double), __sinhl_finite
);
415 extern double __REDIRECT_NTH (sqrt
, (double), __sqrt_finite
);
416 extern float __REDIRECT_NTH (sqrtf
, (float), __sqrtf_finite
);
417 #ifdef __MATH_DECLARE_LDOUBLE
418 # ifdef __NO_LONG_DOUBLE_MATH
419 extern long double __REDIRECT_NTH (sqrtl
, (long double), __sqrt_finite
);
421 extern long double __REDIRECT_NTH (sqrtl
, (long double), __sqrtl_finite
);
427 extern double __gamma_r_finite (double, int *);
428 __extern_always_inline
double __NTH (tgamma (double __d
))
430 int __local_signgam
= 0;
431 double __res
= __gamma_r_finite (__d
, &__local_signgam
);
432 return __local_signgam
< 0 ? -__res
: __res
;
434 extern float __gammaf_r_finite (float, int *);
435 __extern_always_inline
float __NTH (tgammaf (float __d
))
437 int __local_signgam
= 0;
438 float __res
= __gammaf_r_finite (__d
, &__local_signgam
);
439 return __local_signgam
< 0 ? -__res
: __res
;
441 # ifdef __MATH_DECLARE_LDOUBLE
442 extern long double __gammal_r_finite (long double, int *);
443 __extern_always_inline
long double __NTH (tgammal (long double __d
))
445 int __local_signgam
= 0;
446 # ifdef __NO_LONG_DOUBLE_MATH
447 long double __res
= __gamma_r_finite (__d
, &__local_signgam
);
449 long double __res
= __gammal_r_finite (__d
, &__local_signgam
);
451 return __local_signgam
< 0 ? -__res
: __res
;