1 /* Entry points to finite-math-only compiler runs.
2 Copyright (C) 2011, 2012 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 extern long double __REDIRECT_NTH (acosl
, (long double), __acosl_finite
);
30 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
32 extern double __REDIRECT_NTH (acosh
, (double), __acosh_finite
);
33 extern float __REDIRECT_NTH (acoshf
, (float), __acoshf_finite
);
34 # ifdef __MATH_DECLARE_LDOUBLE
35 extern long double __REDIRECT_NTH (acoshl
, (long double), __acoshl_finite
);
40 extern double __REDIRECT_NTH (asin
, (double), __asin_finite
);
41 extern float __REDIRECT_NTH (asinf
, (float), __asinf_finite
);
42 #ifdef __MATH_DECLARE_LDOUBLE
43 extern long double __REDIRECT_NTH (asinl
, (long double), __asinl_finite
);
47 extern double __REDIRECT_NTH (atan2
, (double, double), __atan2_finite
);
48 extern float __REDIRECT_NTH (atan2f
, (float, float), __atan2f_finite
);
49 #ifdef __MATH_DECLARE_LDOUBLE
50 extern long double __REDIRECT_NTH (atan2l
, (long double, long double),
54 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
56 extern double __REDIRECT_NTH (atanh
, (double), __atanh_finite
);
57 extern float __REDIRECT_NTH (atanhf
, (float), __atanhf_finite
);
58 # ifdef __MATH_DECLARE_LDOUBLE
59 extern long double __REDIRECT_NTH (atanhl
, (long double), __atanhl_finite
);
64 extern double __REDIRECT_NTH (cosh
, (double), __cosh_finite
);
65 extern float __REDIRECT_NTH (coshf
, (float), __coshf_finite
);
66 #ifdef __MATH_DECLARE_LDOUBLE
67 extern long double __REDIRECT_NTH (coshl
, (long double), __coshl_finite
);
71 extern double __REDIRECT_NTH (exp
, (double), __exp_finite
);
72 extern float __REDIRECT_NTH (expf
, (float), __expf_finite
);
73 #ifdef __MATH_DECLARE_LDOUBLE
74 extern long double __REDIRECT_NTH (expl
, (long double), __expl_finite
);
79 extern double __REDIRECT_NTH (exp10
, (double), __exp10_finite
);
80 extern float __REDIRECT_NTH (exp10f
, (float), __exp10f_finite
);
81 # ifdef __MATH_DECLARE_LDOUBLE
82 extern long double __REDIRECT_NTH (exp10l
, (long double), __exp10l_finite
);
86 extern double __REDIRECT_NTH (pow10
, (double), __exp10_finite
);
87 extern float __REDIRECT_NTH (pow10f
, (float), __exp10f_finite
);
88 # ifdef __MATH_DECLARE_LDOUBLE
89 extern long double __REDIRECT_NTH (pow10l
, (long double), __exp10l_finite
);
95 extern double __REDIRECT_NTH (exp2
, (double), __exp2_finite
);
96 extern float __REDIRECT_NTH (exp2f
, (float), __exp2f_finite
);
97 # ifdef __MATH_DECLARE_LDOUBLE
98 extern long double __REDIRECT_NTH (exp2l
, (long double), __exp2l_finite
);
103 extern double __REDIRECT_NTH (fmod
, (double, double), __fmod_finite
);
104 extern float __REDIRECT_NTH (fmodf
, (float, float), __fmodf_finite
);
105 #ifdef __MATH_DECLARE_LDOUBLE
106 extern long double __REDIRECT_NTH (fmodl
, (long double, long double),
112 extern double __REDIRECT_NTH (hypot
, (double, double), __hypot_finite
);
113 extern float __REDIRECT_NTH (hypotf
, (float, float), __hypotf_finite
);
114 # ifdef __MATH_DECLARE_LDOUBLE
115 extern long double __REDIRECT_NTH (hypotl
, (long double, long double),
120 #if defined __USE_MISC || defined __USE_XOPEN
122 extern double __REDIRECT_NTH (j0
, (double), __j0_finite
);
123 extern float __REDIRECT_NTH (j0f
, (float), __j0f_finite
);
124 # ifdef __MATH_DECLARE_LDOUBLE
125 extern long double __REDIRECT_NTH (j0l
, (long double), __j0l_finite
);
129 extern double __REDIRECT_NTH (y0
, (double), __y0_finite
);
130 extern float __REDIRECT_NTH (y0f
, (float), __y0f_finite
);
131 # ifdef __MATH_DECLARE_LDOUBLE
132 extern long double __REDIRECT_NTH (y0l
, (long double), __y0l_finite
);
136 extern double __REDIRECT_NTH (j1
, (double), __j1_finite
);
137 extern float __REDIRECT_NTH (j1f
, (float), __j1f_finite
);
138 # ifdef __MATH_DECLARE_LDOUBLE
139 extern long double __REDIRECT_NTH (j1l
, (long double), __j1l_finite
);
143 extern double __REDIRECT_NTH (y1
, (double), __y1_finite
);
144 extern float __REDIRECT_NTH (y1f
, (float), __y1f_finite
);
145 # ifdef __MATH_DECLARE_LDOUBLE
146 extern long double __REDIRECT_NTH (y1l
, (long double), __y1l_finite
);
150 extern double __REDIRECT_NTH (jn
, (int, double), __jn_finite
);
151 extern float __REDIRECT_NTH (jnf
, (int, float), __jnf_finite
);
152 # ifdef __MATH_DECLARE_LDOUBLE
153 extern long double __REDIRECT_NTH (jnl
, (int, long double), __jnl_finite
);
157 extern double __REDIRECT_NTH (yn
, (int, double), __yn_finite
);
158 extern float __REDIRECT_NTH (ynf
, (int, float), __ynf_finite
);
159 # ifdef __MATH_DECLARE_LDOUBLE
160 extern long double __REDIRECT_NTH (ynl
, (int, long double), __ynl_finite
);
166 extern double __REDIRECT_NTH (lgamma_r
, (double, int *), __lgamma_r_finite
);
167 extern float __REDIRECT_NTH (lgammaf_r
, (float, int *), __lgammaf_r_finite
);
168 # ifdef __MATH_DECLARE_LDOUBLE
169 extern long double __REDIRECT_NTH (lgammal_r
, (long double, int *),
174 #if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99
176 __extern_always_inline
double __NTH (lgamma (double __d
))
179 int __local_signgam
= 0;
180 return lgamma_r (__d
, &__local_signgam
);
182 return lgamma_r (__d
, &signgam
);
185 __extern_always_inline
float __NTH (lgammaf (float __d
))
188 int __local_signgam
= 0;
189 return lgammaf_r (__d
, &__local_signgam
);
191 return lgammaf_r (__d
, &signgam
);
194 # ifdef __MATH_DECLARE_LDOUBLE
195 __extern_always_inline
long double __NTH (lgammal (long double __d
))
198 int __local_signgam
= 0;
199 return lgammal_r (__d
, &__local_signgam
);
201 return lgammal_r (__d
, &signgam
);
207 #if defined __USE_MISC || defined __USE_XOPEN
209 __extern_always_inline
double __NTH (gamma (double __d
))
212 int __local_signgam
= 0;
213 return lgamma_r (__d
, &__local_signgam
);
215 return lgamma_r (__d
, &signgam
);
218 __extern_always_inline
float __NTH (gammaf (float __d
))
221 int __local_signgam
= 0;
222 return lgammaf_r (__d
, &__local_signgam
);
224 return lgammaf_r (__d
, &signgam
);
227 # ifdef __MATH_DECLARE_LDOUBLE
228 __extern_always_inline
long double __NTH (gammal (long double __d
))
231 int __local_signgam
= 0;
232 return lgammal_r (__d
, &__local_signgam
);
234 return lgammal_r (__d
, &signgam
);
241 extern double __REDIRECT_NTH (log
, (double), __log_finite
);
242 extern float __REDIRECT_NTH (logf
, (float), __logf_finite
);
243 #ifdef __MATH_DECLARE_LDOUBLE
244 extern long double __REDIRECT_NTH (logl
, (long double), __logl_finite
);
248 extern double __REDIRECT_NTH (log10
, (double), __log10_finite
);
249 extern float __REDIRECT_NTH (log10f
, (float), __log10f_finite
);
250 #ifdef __MATH_DECLARE_LDOUBLE
251 extern long double __REDIRECT_NTH (log10l
, (long double), __log10l_finite
);
256 extern double __REDIRECT_NTH (log2
, (double), __log2_finite
);
257 extern float __REDIRECT_NTH (log2f
, (float), __log2f_finite
);
258 # ifdef __MATH_DECLARE_LDOUBLE
259 extern long double __REDIRECT_NTH (log2l
, (long double), __log2l_finite
);
264 extern double __REDIRECT_NTH (ldexp
, (double, int), scalbn
);
265 extern float __REDIRECT_NTH (ldexpf
, (float, int), scalbnf
);
266 #ifdef __MATH_DECLARE_LDOUBLE
267 extern long double __REDIRECT_NTH (ldexpl
, (long double, int), scalbnl
);
271 extern double __REDIRECT_NTH (pow
, (double, double), __pow_finite
);
272 extern float __REDIRECT_NTH (powf
, (float, float), __powf_finite
);
273 #ifdef __MATH_DECLARE_LDOUBLE
274 extern long double __REDIRECT_NTH (powl
, (long double, long double),
279 extern double __REDIRECT_NTH (remainder
, (double, double), __remainder_finite
);
280 extern float __REDIRECT_NTH (remainderf
, (float, float), __remainderf_finite
);
281 #ifdef __MATH_DECLARE_LDOUBLE
282 extern long double __REDIRECT_NTH (remainderl
, (long double, long double),
283 __remainderl_finite
);
286 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
288 extern double __REDIRECT_NTH (scalb
, (double, double), __scalb_finite
);
289 extern float __REDIRECT_NTH (scalbf
, (float, float), __scalbf_finite
);
290 # ifdef __MATH_DECLARE_LDOUBLE
291 extern long double __REDIRECT_NTH (scalbl
, (long double, long double),
297 extern double __REDIRECT_NTH (sinh
, (double), __sinh_finite
);
298 extern float __REDIRECT_NTH (sinhf
, (float), __sinhf_finite
);
299 #ifdef __MATH_DECLARE_LDOUBLE
300 extern long double __REDIRECT_NTH (sinhl
, (long double), __sinhl_finite
);
304 extern double __REDIRECT_NTH (sqrt
, (double), __sqrt_finite
);
305 extern float __REDIRECT_NTH (sqrtf
, (float), __sqrtf_finite
);
306 #ifdef __MATH_DECLARE_LDOUBLE
307 extern long double __REDIRECT_NTH (sqrtl
, (long double), __sqrtl_finite
);
312 extern double __gamma_r_finite (double, int *);
313 __extern_always_inline
double __NTH (tgamma (double __d
))
315 int __local_signgam
= 0;
316 double __res
= __gamma_r_finite (__d
, &__local_signgam
);
317 return __local_signgam
< 0 ? -__res
: __res
;
319 extern float __gammaf_r_finite (float, int *);
320 __extern_always_inline
float __NTH (tgammaf (float __d
))
322 int __local_signgam
= 0;
323 float __res
= __gammaf_r_finite (__d
, &__local_signgam
);
324 return __local_signgam
< 0 ? -__res
: __res
;
326 # ifdef __MATH_DECLARE_LDOUBLE
327 extern long double __gammal_r_finite (long double, int *);
328 __extern_always_inline
long double __NTH (tgammal (long double __d
))
330 int __local_signgam
= 0;
331 long double __res
= __gammal_r_finite (__d
, &__local_signgam
);
332 return __local_signgam
< 0 ? -__res
: __res
;