1 /* Entry points to finite-math-only compiler runs.
2 Copyright (C) 2011 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, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 # error "Never use <bits/math-finite.h> directly; include <math.h> instead."
25 extern double acos (double) __asm__ ("__acos_finite");
26 extern float acosf (float) __asm__ ("__acosf_finite");
27 #ifdef __MATH_DECLARE_LDOUBLE
28 extern long double acosl (long double) __asm__ ("__acosl_finite");
31 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
33 extern double acosh (double) __asm__ ("__acosh_finite");
34 extern float acoshf (float) __asm__ ("__acoshf_finite");
35 # ifdef __MATH_DECLARE_LDOUBLE
36 extern long double acoshl (long double) __asm__ ("__acoshl_finite");
41 extern double asin (double) __asm__ ("__asin_finite");
42 extern float asinf (float) __asm__ ("__asinf_finite");
43 #ifdef __MATH_DECLARE_LDOUBLE
44 extern long double asinl (long double) __asm__ ("__asinl_finite");
48 extern double atan2 (double, double) __asm__ ("__atan2_finite");
49 extern float atan2f (float, float) __asm__ ("__atan2f_finite");
50 #ifdef __MATH_DECLARE_LDOUBLE
51 extern long double atan2l (long double, long double) __asm__ ("__atan2l_finite");
54 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
56 extern double atanh (double) __asm__ ("__atanh_finite");
57 extern float atanhf (float) __asm__ ("__atanhf_finite");
58 # ifdef __MATH_DECLARE_LDOUBLE
59 extern long double atanhl (long double) __asm__ ("__atanhl_finite");
64 extern double cosh (double) __asm__ ("__cosh_finite");
65 extern float coshf (float) __asm__ ("__coshf_finite");
66 #ifdef __MATH_DECLARE_LDOUBLE
67 extern long double coshl (long double) __asm__ ("__coshl_finite");
71 extern double exp (double) __asm__ ("__exp_finite");
72 extern float expf (float) __asm__ ("__expf_finite");
73 #ifdef __MATH_DECLARE_LDOUBLE
74 extern long double expl (long double) __asm__ ("__expl_finite");
79 extern double exp10 (double) __asm__ ("__exp10_finite");
80 extern float exp10f (float) __asm__ ("__exp10f_finite");
81 # ifdef __MATH_DECLARE_LDOUBLE
82 extern long double exp10l (long double) __asm__ ("__exp10l_finite");
86 extern double pow10 (double) __asm__ ("__exp10_finite");
87 extern float pow10f (float) __asm__ ("__exp10f_finite");
88 # ifdef __MATH_DECLARE_LDOUBLE
89 extern long double pow10l (long double) __asm__ ("__exp10l_finite");
95 extern double exp2 (double) __asm__ ("__exp2_finite");
96 extern float exp2f (float) __asm__ ("__exp2f_finite");
97 # ifdef __MATH_DECLARE_LDOUBLE
98 extern long double exp2l (long double) __asm__ ("__exp2l_finite");
103 extern double fmod (double, double) __asm__ ("__fmod_finite");
104 extern float fmodf (float, float) __asm__ ("__fmodf_finite");
105 #ifdef __MATH_DECLARE_LDOUBLE
106 extern long double fmodl (long double, long double) __asm__ ("__fmodl_finite");
111 extern double hypot (double, double) __asm__ ("__hypot_finite");
112 extern float hypotf (float, float) __asm__ ("__hypotf_finite");
113 # ifdef __MATH_DECLARE_LDOUBLE
114 extern long double hypotl (long double, long double) __asm__ ("__hypotl_finite");
118 #if defined __USE_MISC || defined __USE_XOPEN
120 extern double j0 (double) __asm__ ("__j0_finite");
121 extern float j0f (float) __asm__ ("__j0f_finite");
122 # ifdef __MATH_DECLARE_LDOUBLE
123 extern long double j0l (long double) __asm__ ("__j0l_finite");
127 extern double y0 (double) __asm__ ("__y0_finite");
128 extern float y0f (float) __asm__ ("__y0f_finite");
129 # ifdef __MATH_DECLARE_LDOUBLE
130 extern long double y0l (long double) __asm__ ("__y0l_finite");
134 extern double j1 (double) __asm__ ("__j1_finite");
135 extern float j1f (float) __asm__ ("__j1f_finite");
136 # ifdef __MATH_DECLARE_LDOUBLE
137 extern long double j1l (long double) __asm__ ("__j1l_finite");
141 extern double y1 (double) __asm__ ("__y1_finite");
142 extern float y1f (float) __asm__ ("__y1f_finite");
143 # ifdef __MATH_DECLARE_LDOUBLE
144 extern long double y1l (long double) __asm__ ("__y1l_finite");
148 extern double jn (int, double) __asm__ ("__jn_finite");
149 extern float jnf (int, float) __asm__ ("__jnf_finite");
150 # ifdef __MATH_DECLARE_LDOUBLE
151 extern long double jnl (int, long double) __asm__ ("__jnl_finite");
155 extern double yn (int, double) __asm__ ("__yn_finite");
156 extern float ynf (int, float) __asm__ ("__ynf_finite");
157 # ifdef __MATH_DECLARE_LDOUBLE
158 extern long double ynl (int, long double) __asm__ ("__ynl_finite");
164 extern double lgamma_r (double, int *) __asm__ ("__lgamma_r_finite");
165 extern float lgammaf_r (float, int *) __asm__ ("__lgammaf_r_finite");
166 # ifdef __MATH_DECLARE_LDOUBLE
167 extern long double lgammal_r (long double, int *) __asm__ ("__lgammal_r_finite");
171 #if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99
173 __extern_always_inline double lgamma (double __d)
176 int __local_signgam = 0;
177 return lgamma_r (__d, &__local_signgam);
179 return lgamma_r (__d, &signgam);
182 __extern_always_inline float lgammaf (float __d)
185 int __local_signgam = 0;
186 return lgammaf_r (__d, &__local_signgam);
188 return lgammaf_r (__d, &signgam);
191 # ifdef __MATH_DECLARE_LDOUBLE
192 __extern_always_inline long double lgammal (long double __d)
195 int __local_signgam = 0;
196 return lgammal_r (__d, &__local_signgam);
198 return lgammal_r (__d, &signgam);
204 #if defined __USE_MISC || defined __USE_XOPEN
206 __extern_always_inline double gamma (double __d)
209 int __local_signgam = 0;
210 return lgamma_r (__d, &__local_signgam);
212 return lgamma_r (__d, &signgam);
215 __extern_always_inline float gammaf (float __d)
218 int __local_signgam = 0;
219 return lgammaf_r (__d, &__local_signgam);
221 return lgammaf_r (__d, &signgam);
224 # ifdef __MATH_DECLARE_LDOUBLE
225 __extern_always_inline long double gammal (long double __d)
228 int __local_signgam = 0;
229 return lgammal_r (__d, &__local_signgam);
231 return lgammal_r (__d, &signgam);
238 extern double log (double) __asm__ ("__log_finite");
239 extern float logf (float) __asm__ ("__logf_finite");
240 #ifdef __MATH_DECLARE_LDOUBLE
241 extern long double logl (long double) __asm__ ("__logl_finite");
245 extern double log10 (double) __asm__ ("__log10_finite");
246 extern float log10f (float) __asm__ ("__log10f_finite");
247 #ifdef __MATH_DECLARE_LDOUBLE
248 extern long double log10l (long double) __asm__ ("__log10l_finite");
253 extern double log2 (double) __asm__ ("__log2_finite");
254 extern float log2f (float) __asm__ ("__log2f_finite");
255 # ifdef __MATH_DECLARE_LDOUBLE
256 extern long double log2l (long double) __asm__ ("__log2l_finite");
261 extern double pow (double, double) __asm__ ("__pow_finite");
262 extern float powf (float, float) __asm__ ("__powf_finite");
263 #ifdef __MATH_DECLARE_LDOUBLE
264 extern long double powl (long double, long double) __asm__ ("__powl_finite");
268 extern double remainder (double, double) __asm__ ("__remainder_finite");
269 extern float remainderf (float, float) __asm__ ("__remainderf_finite");
270 #ifdef __MATH_DECLARE_LDOUBLE
271 extern long double remainderl (long double, long double) __asm__ ("__remainderl_finite");
274 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
276 extern double scalb (double, double) __asm__ ("__scalb_finite");
277 extern float scalbf (float, float) __asm__ ("__scalbf_finite");
278 # ifdef __MATH_DECLARE_LDOUBLE
279 extern long double scalbl (long double, long double) __asm__ ("__scalbl_finite");
284 extern double sinh (double) __asm__ ("__sinh_finite");
285 extern float sinhf (float) __asm__ ("__sinhf_finite");
286 #ifdef __MATH_DECLARE_LDOUBLE
287 extern long double sinhl (long double) __asm__ ("__sinhl_finite");
291 extern double sqrt (double) __asm__ ("__sqrt_finite");
292 extern float sqrtf (float) __asm__ ("__sqrtf_finite");
293 #ifdef __MATH_DECLARE_LDOUBLE
294 extern long double sqrtl (long double) __asm__ ("__sqrtl_finite");
299 extern double __gamma_r_finite (double, int *);
300 __extern_always_inline double tgamma (double __d)
302 int __local_signgam = 0;
303 double __res = __gamma_r_finite (__d, &__local_signgam);
304 return __local_signgam < 0 ? -__res : __res;
306 extern float __gammaf_r_finite (float, int *);
307 __extern_always_inline float tgammaf (float __d)
309 int __local_signgam = 0;
310 float __res = __gammaf_r_finite (__d, &__local_signgam);
311 return __local_signgam < 0 ? -__res : __res;
313 # ifdef __MATH_DECLARE_LDOUBLE
314 extern long double __gammal_r_finite (long double, int *);
315 __extern_always_inline long double tgammal (long double __d)
317 int __local_signgam = 0;
318 long double __res = __gammal_r_finite (__d, &__local_signgam);
319 return __local_signgam < 0 ? -__res : __res;