GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / toolchains / hndtools-arm-linux-2.6.36-uclibc-4.5.3 / arm-brcm-linux-uclibcgnueabi / sysroot / usr / include / bits / mathcalls.h
blob1e92b527e4996f9de6ab119dfb724f9667b25194
1 /* Prototype declarations for math functions; helper file for <math.h>.
2 Copyright (C) 1996-2002, 2003, 2006 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
18 02111-1307 USA. */
20 /* NOTE: Because of the special way this file is used by <math.h>, this
21 file must NOT be protected from multiple inclusion as header files
22 usually are.
24 This file provides prototype declarations for the math functions.
25 Most functions are declared using the macro:
27 __MATHCALL (NAME,[_r], (ARGS...))
29 This means there is a function `NAME' returning `double' and a function
30 `NAMEf' returning `float'. Each place `_Mdouble_' appears in the
31 prototype, that is actually `double' in the prototype for `NAME' and
32 `float' in the prototype for `NAMEf'. Reentrant variant functions are
33 called `NAME_r' and `NAMEf_r'.
35 Functions returning other types like `int' are declared using the macro:
37 __MATHDECL (TYPE, NAME,[_r], (ARGS...))
39 This is just like __MATHCALL but for a function returning `TYPE'
40 instead of `_Mdouble_'. In all of these cases, there is still
41 both a `NAME' and a `NAMEf' that takes `float' arguments.
43 Note that there must be no whitespace before the argument passed for
44 NAME, to make token pasting work with -traditional. */
46 #ifndef _MATH_H
47 # error "Never include <bits/mathcalls.h> directly; include <math.h> instead."
48 #endif
51 /* __MATHCALLX(type,function,[suffix],args,attrib) and
52 * __MATHCALLI(type,function,[suffix],args) include libm_hidden_def
53 * (for "double" versions only, xxxf and xxxl do not get this treatment).
55 * __MATHDECL(type,function,[suffix],args) does not.
56 * __MATHCALL(function,[suffix],args) also does not
57 * (it is just a shortcut to __MATHDECL(_Mdouble_,function,[suffix],args)).
59 * __MATHDECL_PRIV(type,function,[suffix],args,attrib)
60 * includes libm_hidden_def (always) and declares __foo, not foo.
64 /* Trigonometric functions. */
66 _Mdouble_BEGIN_NAMESPACE
67 /* Arc cosine of X. */
68 __MATHCALLI (acos,, (_Mdouble_ __x))
69 /* Arc sine of X. */
70 __MATHCALLI (asin,, (_Mdouble_ __x))
71 /* Arc tangent of X. */
72 __MATHCALLI (atan,, (_Mdouble_ __x))
73 /* Arc tangent of Y/X. */
74 __MATHCALLI (atan2,, (_Mdouble_ __y, _Mdouble_ __x))
76 /* Cosine of X. */
77 __MATHCALLI (cos,, (_Mdouble_ __x))
78 /* Sine of X. */
79 __MATHCALLI (sin,, (_Mdouble_ __x))
80 /* Tangent of X. */
81 __MATHCALLI (tan,, (_Mdouble_ __x))
83 /* Hyperbolic functions. */
85 /* Hyperbolic cosine of X. */
86 __MATHCALLI (cosh,, (_Mdouble_ __x))
87 /* Hyperbolic sine of X. */
88 __MATHCALLI (sinh,, (_Mdouble_ __x))
89 /* Hyperbolic tangent of X. */
90 __MATHCALLI (tanh,, (_Mdouble_ __x))
91 _Mdouble_END_NAMESPACE
93 #if 0 /*def __USE_GNU*/
94 /* Cosine and sine of X. */
95 __MATHDECL (void,sincos,,
96 (_Mdouble_ __x, _Mdouble_ *__sinx, _Mdouble_ *__cosx))
97 #endif
99 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
100 __BEGIN_NAMESPACE_C99
101 /* Hyperbolic arc cosine of X. */
102 __MATHCALLI (acosh,, (_Mdouble_ __x))
103 /* Hyperbolic arc sine of X. */
104 __MATHCALLI (asinh,, (_Mdouble_ __x))
105 /* Hyperbolic arc tangent of X. */
106 __MATHCALLI (atanh,, (_Mdouble_ __x))
107 __END_NAMESPACE_C99
108 #endif
110 /* Exponential and logarithmic functions. */
112 _Mdouble_BEGIN_NAMESPACE
113 /* Exponential function of X. */
114 __MATHCALLI (exp,, (_Mdouble_ __x))
116 /* Break VALUE into a normalized fraction and an integral power of 2. */
117 __MATHCALLI (frexp,, (_Mdouble_ __x, int *__exponent))
119 /* X times (two to the EXP power). */
120 __MATHCALLI (ldexp,, (_Mdouble_ __x, int __exponent))
122 /* Natural logarithm of X. */
123 __MATHCALLI (log,, (_Mdouble_ __x))
125 /* Base-ten logarithm of X. */
126 __MATHCALLI (log10,, (_Mdouble_ __x))
128 /* Break VALUE into integral and fractional parts. */
129 __MATHCALLI (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr))
130 _Mdouble_END_NAMESPACE
132 #if 0 /*def __USE_GNU*/
133 /* A function missing in all standards: compute exponent to base ten. */
134 __MATHCALL (exp10,, (_Mdouble_ __x))
135 /* Another name occasionally used. */
136 __MATHCALL (pow10,, (_Mdouble_ __x))
137 #endif
139 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
140 __BEGIN_NAMESPACE_C99
141 /* Return exp(X) - 1. */
142 __MATHCALLI (expm1,, (_Mdouble_ __x))
144 /* Return log(1 + X). */
145 __MATHCALLI (log1p,, (_Mdouble_ __x))
147 /* Return the base 2 signed integral exponent of X. */
148 __MATHCALLI (logb,, (_Mdouble_ __x))
149 __END_NAMESPACE_C99
150 #endif
152 #ifdef __USE_ISOC99
153 __BEGIN_NAMESPACE_C99
154 /* Compute base-2 exponential of X. */
155 __MATHCALLI (exp2,, (_Mdouble_ __x))
157 /* Compute base-2 logarithm of X. */
158 __MATHCALL (log2,, (_Mdouble_ __x))
159 __END_NAMESPACE_C99
160 #endif
163 /* Power functions. */
165 _Mdouble_BEGIN_NAMESPACE
166 /* Return X to the Y power. */
167 __MATHCALLI (pow,, (_Mdouble_ __x, _Mdouble_ __y))
169 /* Return the square root of X. */
170 __MATHCALLI (sqrt,, (_Mdouble_ __x))
171 _Mdouble_END_NAMESPACE
173 #if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99
174 __BEGIN_NAMESPACE_C99
175 /* Return `sqrt(X*X + Y*Y)'. */
176 __MATHCALLI (hypot,, (_Mdouble_ __x, _Mdouble_ __y))
177 __END_NAMESPACE_C99
178 #endif
180 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
181 __BEGIN_NAMESPACE_C99
182 /* Return the cube root of X. */
183 __MATHCALLI (cbrt,, (_Mdouble_ __x))
184 __END_NAMESPACE_C99
185 #endif
188 /* Nearest integer, absolute value, and remainder functions. */
190 _Mdouble_BEGIN_NAMESPACE
191 /* Smallest integral value not less than X. */
192 __MATHCALLX (ceil,, (_Mdouble_ __x), (__const__))
194 /* Absolute value of X. */
195 __MATHCALLX (fabs,, (_Mdouble_ __x), (__const__))
197 /* Largest integer not greater than X. */
198 __MATHCALLX (floor,, (_Mdouble_ __x), (__const__))
200 /* Floating-point modulo remainder of X/Y. */
201 __MATHCALLI (fmod,, (_Mdouble_ __x, _Mdouble_ __y))
204 /* Return 0 if VALUE is finite or NaN, +1 if it
205 is +Infinity, -1 if it is -Infinity. */
206 __MATHDECL_PRIV (int,isinf,, (_Mdouble_ __value), (__const__))
208 /* Return nonzero if VALUE is finite and not NaN. */
209 __MATHDECL_PRIV (int,finite,, (_Mdouble_ __value), (__const__))
210 _Mdouble_END_NAMESPACE
212 #ifdef __USE_MISC
213 #if 0
214 /* Return 0 if VALUE is finite or NaN, +1 if it
215 is +Infinity, -1 if it is -Infinity. */
216 __MATHDECL_PRIV (int,isinf,, (_Mdouble_ __value), (__const__))
218 /* Return nonzero if VALUE is finite and not NaN. */
219 __MATHDECL_PRIV (int,finite,, (_Mdouble_ __value), (__const__))
220 #endif
221 /* Return the remainder of X/Y. */
222 __MATHCALL (drem,, (_Mdouble_ __x, _Mdouble_ __y))
225 /* Return the fractional part of X after dividing out `ilogb (X)'. */
226 __MATHCALL (significand,, (_Mdouble_ __x))
227 #endif /* Use misc. */
229 #if defined __USE_MISC || defined __USE_ISOC99
230 __BEGIN_NAMESPACE_C99
231 /* Return X with its signed changed to Y's. */
232 __MATHCALLX (copysign,, (_Mdouble_ __x, _Mdouble_ __y), (__const__))
233 __END_NAMESPACE_C99
234 #endif
236 #ifdef __USE_ISOC99
237 __BEGIN_NAMESPACE_C99
238 /* Return representation of NaN for double type. */
239 __MATHCALLX (nan,, (__const char *__tagb), (__const__))
240 __END_NAMESPACE_C99
241 #endif
243 #if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99
244 /* Return nonzero if VALUE is not a number. */
245 __BEGIN_NAMESPACE_C99
246 __MATHDECL_PRIV (int,isnan,, (_Mdouble_ __value), (__const__))
247 __END_NAMESPACE_C99
248 #endif
250 #if defined __USE_MISC || defined __USE_XOPEN
251 # ifdef __DO_XSI_MATH__
252 /* Bessel functions. */
253 __MATHCALL (j0,, (_Mdouble_))
254 __MATHCALL (j1,, (_Mdouble_))
255 __MATHCALL (jn,, (int, _Mdouble_))
256 __MATHCALL (y0,, (_Mdouble_))
257 __MATHCALL (y1,, (_Mdouble_))
258 __MATHCALL (yn,, (int, _Mdouble_))
259 # endif
260 #endif
263 #if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99
264 __BEGIN_NAMESPACE_C99
265 /* Error and gamma functions. */
266 __MATHCALLI (erf,, (_Mdouble_))
267 __MATHCALLI (erfc,, (_Mdouble_))
268 __MATHCALLI (lgamma,, (_Mdouble_))
269 __END_NAMESPACE_C99
270 #endif
272 #ifdef __USE_ISOC99
273 __BEGIN_NAMESPACE_C99
274 /* True gamma function. */
275 __MATHCALLI (tgamma,, (_Mdouble_))
276 __END_NAMESPACE_C99
277 #endif
279 #if defined __USE_MISC || defined __USE_XOPEN
280 /* Obsolete alias for `lgamma'. */
281 __MATHCALL (gamma,, (_Mdouble_))
282 #endif
284 #ifdef __USE_MISC
285 /* Reentrant version of lgamma. This function uses the global variable
286 `signgam'. The reentrant version instead takes a pointer and stores
287 the value through it. */
288 __MATHCALL (lgamma,_r, (_Mdouble_, int *__signgamp))
289 #endif
292 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
293 __BEGIN_NAMESPACE_C99
294 /* Return the integer nearest X in the direction of the
295 prevailing rounding mode. */
296 __MATHCALLI (rint,, (_Mdouble_ __x))
298 /* Return X + epsilon if X < Y, X - epsilon if X > Y. */
299 __MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__))
300 # if defined __USE_ISOC99 && !defined __LDBL_COMPAT
301 __MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__))
302 # endif
304 /* Return the remainder of integer divison X / Y with infinite precision. */
305 __MATHCALLI (remainder,, (_Mdouble_ __x, _Mdouble_ __y))
307 # if defined __USE_MISC || defined __USE_ISOC99
308 /* Return X times (2 to the Nth power). */
309 __MATHCALLI (scalbn,, (_Mdouble_ __x, int __n))
310 # endif
312 /* Return the binary exponent of X, which must be nonzero. */
313 __MATHDECLI (int,ilogb,, (_Mdouble_ __x))
314 #endif
316 #ifdef __USE_ISOC99
317 /* Return X times (2 to the Nth power). */
318 __MATHCALLI (scalbln,, (_Mdouble_ __x, long int __n))
320 /* Round X to integral value in floating-point format using current
321 rounding direction, but do not raise inexact exception. */
322 __MATHCALLI (nearbyint,, (_Mdouble_ __x))
324 /* Round X to nearest integral value, rounding halfway cases away from
325 zero. */
326 __MATHCALLX (round,, (_Mdouble_ __x), (__const__))
328 /* Round X to the integral value in floating-point format nearest but
329 not larger in magnitude. */
330 __MATHCALLX (trunc,, (_Mdouble_ __x), (__const__))
332 /* Compute remainder of X and Y and put in *QUO a value with sign of x/y
333 and magnitude congruent `mod 2^n' to the magnitude of the integral
334 quotient x/y, with n >= 3. */
335 __MATHCALLI (remquo,, (_Mdouble_ __x, _Mdouble_ __y, int *__quo))
338 /* Conversion functions. */
340 /* Round X to nearest integral value according to current rounding
341 direction. */
342 __MATHDECLI (long int,lrint,, (_Mdouble_ __x))
343 __MATHDECLI (long long int,llrint,, (_Mdouble_ __x))
345 /* Round X to nearest integral value, rounding halfway cases away from
346 zero. */
347 __MATHDECLI (long int,lround,, (_Mdouble_ __x))
348 __MATHDECLI (long long int,llround,, (_Mdouble_ __x))
351 /* Return positive difference between X and Y. */
352 __MATHCALLI (fdim,, (_Mdouble_ __x, _Mdouble_ __y))
354 /* Return maximum numeric value from X and Y. */
355 __MATHCALLI (fmax,, (_Mdouble_ __x, _Mdouble_ __y))
357 /* Return minimum numeric value from X and Y. */
358 __MATHCALLI (fmin,, (_Mdouble_ __x, _Mdouble_ __y))
361 /* Classify given number. */
362 __MATHDECL_PRIV (int, fpclassify,, (_Mdouble_ __value), (__const__))
364 /* Test for negative number. */
365 __MATHDECL_PRIV (int, signbit,, (_Mdouble_ __value), (__const__))
368 /* Multiply-add function computed as a ternary operation. */
369 __MATHCALLI (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z))
370 #endif /* Use ISO C99. */
372 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
373 __END_NAMESPACE_C99
374 #endif
376 #if (defined __USE_MISC || defined __USE_XOPEN_EXTENDED) \
377 && defined __UCLIBC_SUSV3_LEGACY__
378 /* Return X times (2 to the Nth power). */
379 __MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n))
380 #endif