• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * @defgroup math Math
3  * @ingroup libm
4  */
5 
6 #ifndef _MATH_H
7 #define _MATH_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 #include <features.h>
14 
15 #define __NEED_float_t
16 #define __NEED_double_t
17 #include <bits/alltypes.h>
18 
19 #if 100*__GNUC__+__GNUC_MINOR__ >= 303
20 #define NAN       __builtin_nanf("")
21 #define INFINITY  __builtin_inff()
22 #else
23 #define NAN       (0.0f/0.0f)
24 #define INFINITY  1e5000f
25 #endif
26 
27 #define HUGE_VALF INFINITY
28 #define HUGE_VAL  ((double)INFINITY)
29 #define HUGE_VALL ((long double)INFINITY)
30 
31 #define MATH_ERRNO  1
32 #define MATH_ERREXCEPT 2
33 #define math_errhandling 2
34 
35 #define FP_ILOGBNAN (-1-0x7fffffff)
36 #define FP_ILOGB0 FP_ILOGBNAN
37 
38 #define FP_NAN       0
39 #define FP_INFINITE  1
40 #define FP_ZERO      2
41 #define FP_SUBNORMAL 3
42 #define FP_NORMAL    4
43 
44 #ifdef __FP_FAST_FMA
45 #define FP_FAST_FMA 1
46 #endif
47 
48 #ifdef __FP_FAST_FMAF
49 #define FP_FAST_FMAF 1
50 #endif
51 
52 #ifdef __FP_FAST_FMAL
53 #define FP_FAST_FMAL 1
54 #endif
55 
56 int __fpclassify(double);
57 int __fpclassifyf(float);
58 int __fpclassifyl(long double);
59 
__FLOAT_BITS(float __f)60 static __inline unsigned __FLOAT_BITS(float __f)
61 {
62 	union {float __f; unsigned __i;} __u;
63 	__u.__f = __f;
64 	return __u.__i;
65 }
__DOUBLE_BITS(double __f)66 static __inline unsigned long long __DOUBLE_BITS(double __f)
67 {
68 	union {double __f; unsigned long long __i;} __u;
69 	__u.__f = __f;
70 	return __u.__i;
71 }
72 
73 #define fpclassify(x) ( \
74 	sizeof(x) == sizeof(float) ? __fpclassifyf(x) : \
75 	sizeof(x) == sizeof(double) ? __fpclassify(x) : \
76 	__fpclassifyl(x) )
77 
78 #define isinf(x) ( \
79 	sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) == 0x7f800000 : \
80 	sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL>>1) == 0x7ffULL<<52 : \
81 	__fpclassifyl(x) == FP_INFINITE)
82 
83 #define isnan(x) ( \
84 	sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) > 0x7f800000 : \
85 	sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL>>1) > 0x7ffULL<<52 : \
86 	__fpclassifyl(x) == FP_NAN)
87 
88 #define isnormal(x) ( \
89 	sizeof(x) == sizeof(float) ? ((__FLOAT_BITS(x)+0x00800000) & 0x7fffffff) >= 0x01000000 : \
90 	sizeof(x) == sizeof(double) ? ((__DOUBLE_BITS(x)+(1ULL<<52)) & -1ULL>>1) >= 1ULL<<53 : \
91 	__fpclassifyl(x) == FP_NORMAL)
92 
93 #define isfinite(x) ( \
94 	sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) < 0x7f800000 : \
95 	sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL>>1) < 0x7ffULL<<52 : \
96 	__fpclassifyl(x) > FP_INFINITE)
97 
98 /* cmath use using ::isnan, need isnan deferance. */
99 #ifdef __LITEOS__
100 int (isnan)(double);
101 #endif
102 
103 int __signbit(double);
104 int __signbitf(float);
105 int __signbitl(long double);
106 
107 #define signbit(x) ( \
108 	sizeof(x) == sizeof(float) ? (int)(__FLOAT_BITS(x)>>31) : \
109 	sizeof(x) == sizeof(double) ? (int)(__DOUBLE_BITS(x)>>63) : \
110 	__signbitl(x) )
111 
112 #define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
113 
114 #define __ISREL_DEF(rel, op, type) \
115 static __inline int __is##rel(type __x, type __y) \
116 { return !isunordered(__x,__y) && __x op __y; }
117 
118 __ISREL_DEF(lessf, <, float_t)
119 __ISREL_DEF(less, <, double_t)
120 __ISREL_DEF(lessl, <, long double)
121 __ISREL_DEF(lessequalf, <=, float_t)
122 __ISREL_DEF(lessequal, <=, double_t)
123 __ISREL_DEF(lessequall, <=, long double)
124 __ISREL_DEF(lessgreaterf, !=, float_t)
125 __ISREL_DEF(lessgreater, !=, double_t)
126 __ISREL_DEF(lessgreaterl, !=, long double)
127 __ISREL_DEF(greaterf, >, float_t)
128 __ISREL_DEF(greater, >, double_t)
129 __ISREL_DEF(greaterl, >, long double)
130 __ISREL_DEF(greaterequalf, >=, float_t)
131 __ISREL_DEF(greaterequal, >=, double_t)
132 __ISREL_DEF(greaterequall, >=, long double)
133 
134 #define __tg_pred_2(x, y, p) ( \
135 	sizeof((x)+(y)) == sizeof(float) ? p##f(x, y) : \
136 	sizeof((x)+(y)) == sizeof(double) ? p(x, y) : \
137 	p##l(x, y) )
138 
139 #define isless(x, y)            __tg_pred_2(x, y, __isless)
140 #define islessequal(x, y)       __tg_pred_2(x, y, __islessequal)
141 #define islessgreater(x, y)     __tg_pred_2(x, y, __islessgreater)
142 #define isgreater(x, y)         __tg_pred_2(x, y, __isgreater)
143 #define isgreaterequal(x, y)    __tg_pred_2(x, y, __isgreaterequal)
144 
145 /**
146  * @ingroup  math
147  * @par Description:
148  * This function calculates the arc cosine of x; that is the value whose cosine is x.
149  *
150  * @attention
151  * <ul>
152  * <li>None.</li>
153  * </ul>
154  *
155  * @retval
156  * #double On success, this function returns the arc cosine of x in radians;
157  * the return value is in the range [0, pi].\n
158  * If x is a NaN, a NaN is returned.\n
159  * If x is +1, +0 is returned.\n
160  * If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned.\n
161  * If x is outside the range [-1, 1], a domain error occurs, and a NaN is returned.
162  *
163  * @par Dependency:
164  * <ul><li>math.h</li></ul>
165  *
166  * @see  asin | atan | atan2 | cos | sin | tan
167  *
168  */
169 double      acos(double);
170 
171 /**
172  * @ingroup  math
173  * @par Description:
174  * The function calculates the arc cosine of x; that is the value whose cosine is x.
175  *
176  * @attention
177  * <ul>
178  * <li>None.</li>
179  * </ul>
180  *
181  * @retval
182  * #float On success, the function returns the arc cosine of x in radians;
183  * the return value is in the range [0, pi].\n
184  * If x is a NaN, a NaN is returned.\n
185  * If x is +1, +0 is returned.\n
186  * If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned.\n
187  * If x is outside the range [-1, 1], a domain error occurs, and a NaN is returned.\n
188  *
189  * @par Dependency:
190  * <ul><li>math.h</li></ul>
191  *
192  * @see asin | atan | atan2 | cos | sin | tan
193  *
194  */
195 float       acosf(float);
196 
197 /**
198  * @ingroup  math
199  * @par Description:
200  * This function calculates the arc cosine of x; that is the value whose cosine is x.
201  *
202  * @attention
203  * <ul>
204  * <li>None.</li>
205  * </ul>
206  *
207  * @retval "long double" On success, this function returns the arc cosine of x in radians;
208  * the return value is in the range [0, pi].\n
209  * If x is a NaN, a NaN is returned.\n
210  * If x is +1, +0 is returned.\n
211  * If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned.\n
212  * If x is outside the range [-1, 1], a domain error occurs, and a NaN is returned.\n
213  *
214  * @par Dependency:
215  * <ul><li>math.h</li></ul>
216  *
217  * @see  asin | atan | atan2 | cos | sin | tan
218  *
219  */
220 long double acosl(long double);
221 /**
222  * @ingroup  math
223  * @par Description:
224  * This function calculates the inverse hyperbolic cosine of x; that is the value whose hyperbolic cosine is x.
225  *
226  * @attention
227  * <ul>
228  * <li> None.</li>
229  * </ul>
230  *
231  * @retval
232  * #double  On success, this function returns the inverse hyperbolic cosine of x.\n
233  * If x is a NaN, a NaN is returned.\n
234  * If x is +1, +0 is returned.\n
235  * If x is positive infinity, positive infinity is returned.\n
236  * If x is less than 1, a domain error occurs, and the functions return a NaN.\n
237  *
238  * @par Dependency:
239  * <ul><li>math.h</li></ul>
240  *
241  * @see  asinh | atanh | cosh | sinh | tanh
242  *
243  */
244 double      acosh(double);
245 
246 /**
247  * @ingroup  math
248  * @par Description:
249  * This function calculates the inverse hyperbolic cosine of x; that is the value whose hyperbolic cosine is x.
250  *
251  * @attention
252  * <ul>
253  * <li> None.</li>
254  * </ul>
255  *
256  * @retval
257  * #float  On success, this function calculates the inverse hyperbolic cosine of x; that is the value
258  * whose hyperbolic cosine is x.\n
259  * If x is a NaN, a NaN is returned.\n
260  * If x is +1, +0 is returned.\n
261  * If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned.\n
262  * If x is less than 1, a domain error occurs, and the functions return a NaN.\n
263  * @par Dependency:
264  * <ul><li>math.h</li></ul>
265  *
266  * @see  asinh | atanh | cosh | sinh | tanh
267  *
268  */
269 float       acoshf(float);
270 
271 /**
272  * @ingroup  math
273  * @par Description:
274  * This function calculates the inverse hyperbolic cosine of x; that is the value whose hyperbolic cosine is x.
275  *
276  * @attention
277  * <ul>
278  * <li> None.</li>
279  * </ul>
280  *
281  * @retval "long double"  On success, this function returns the inverse hyperbolic cosine of x.\n
282  * If x is a NaN, a NaN is returned.\n
283  * If x is +1, +0 is returned.\n
284  * If x is positive infinity, positive infinity is returned.\n
285  * If x is less than 1, a domain error occurs, and the functions return a NaN.\n
286  *
287  * @par Dependency:
288  * <ul><li>math.h</li></ul>
289  *
290  * @see  asinh | atanh | cosh | sinh | tanh
291  *
292  */
293 long double acoshl(long double);
294 
295 /**
296  * @ingroup  math
297  * @par Description:
298  * This function calculates the arc sine of x; that is the value whose sine is x.
299  *
300  * @attention
301  * <ul>
302  * <li>None.</li>
303  * </ul>
304  *
305  * @retval
306  * #double On success, the function returns the principal value of the arc sine of x in radians;
307  * the return value is in the range [-pi/2, pi/2].\n
308  * If x is a NaN, a NaN is returned.\n
309  * If x is +0 (-0), +0 (-0) is returned.\n
310  * If x is outside the range [-1, 1], a domain error occurs, and a NaN is returned.
311  *
312  * @par Dependency:
313  * <ul><li>math.h</li></ul>
314  *
315  * @see  acos | atan | atan2 | cos | sin | tan
316  *
317  */
318 double      asin(double);
319 
320 /**
321  * @ingroup  math
322  * @par Description:
323  * This function calculates the arc sine of x; that is the value whose sine is x.
324  *
325  * @attention
326  * <ul>
327  * <li> None.</li>
328  * </ul>
329  *
330  * @retval
331  * #float  On success, the function returns the principal value of the arc sine of x in radians;
332  * the return value is in the range [-pi/2, pi/2].\n
333  * If x is a NaN, a NaN is returned.\n
334  * If x is +0 (-0), +0 (-0) is returned.\n
335  * If x is outside the range [-1, 1], a domain error occurs, and a NaN is returned.\n
336  *
337  * @par Dependency:
338  * <ul><li>math.h</li></ul>
339  *
340  * @see  acos | atan | atan2 | cos | sin | tan
341  *
342  */
343 float       asinf(float);
344 
345 /**
346  * @ingroup  math
347  * @par Description:
348  * This function calculates the arc sine of x; that is the value whose sine is x.
349  *
350  * @attention
351  * <ul>
352  * <li>None.</li>
353  * </ul>
354  *
355  * @retval "long double" On success, the function returns the principal value of the arc sine of x in radians;
356  * the return value is in the range [-pi/2, pi/2].\n
357  * If x is a NaN, a NaN is returned.\n
358  * If x is +0 (-0), +0 (-0) is returned.\n
359  * If x is outside the range [-1, 1], a domain error occurs, and a NaN is returned.\n
360  *
361  * @par Dependency:
362  * <ul><li>math.h</li></ul>
363  *
364  * @see  acos | atan | atan2 | cos | sin | tan
365  *
366  */
367 long double asinl(long double);
368 
369 /**
370  * @ingroup  math
371  * @par Description:
372  * This function calculates the inverse hyperbolic sine of x; that is the value whose hyperbolic sine is x.
373  *
374  * @attention
375  * <ul>
376  * <li> None.</li>
377  * </ul>
378  *
379  * @retval
380  * #double  On success, the function returns the inverse hyperbolic sine of x.\n
381  * If x is a NaN, a NaN is returned.\n
382  * If x is +0 (-0), +0 (-0) is returned.\n
383  * If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.\n
384  *
385  * @par Dependency:
386  * <ul><li>math.h</li></ul>
387  *
388  * @see  acosh | atanh | cosh | sinh | tanh
389  *
390  */
391 double      asinh(double);
392 
393 /**
394  * @ingroup  math
395  * @par Description:
396  * This function calculates the inverse hyperbolic sine of x; that is the value whose hyperbolic sine is x.
397  *
398  * @attention
399  * <ul>
400  * <li> None.</li>
401  * </ul>
402  *
403  * @retval
404  * #float  On success, these functions return the inverse hyperbolic sine of x.\n
405  * If x is a NaN, a NaN is returned.\n
406  * If x is +0 (-0), +0 (-0) is returned.\n
407  * If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.\n
408  *
409  * @par Dependency:
410  * <ul><li>math.h</li></ul>
411  *
412  * @see  acosh | atanh | cosh | sinh | tanh
413  *
414  */
415 float       asinhf(float);
416 
417 /**
418  * @ingroup  math
419  * @par Description:
420  * This function calculates the inverse hyperbolic sine of x; that is the value whose hyperbolic sine is x.
421  *
422  * @attention
423  * <ul>
424  * <li> None.</li>
425  * </ul>
426  *
427  * @retval "long double"  On success, the function returns the inverse hyperbolic sine of x.\n
428  * If x is a NaN, a NaN is returned.\n
429  * If x is +0 (-0), +0 (-0) is returned.\n
430  * If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.\n
431  *
432  * @par Dependency:
433  * <ul><li>math.h</li></ul>
434  *
435  * @see  acosh | atanh | cosh | sinh | tanh
436  *
437  */
438 long double asinhl(long double);
439 
440 /**
441  * @ingroup  math
442  * @par Description:
443  * This function calculates the principal value of the arc tangent of x; that is the value whose tangent is x.
444  *
445  * @attention
446  * <ul>
447  * <li>None.</li>
448  * </ul>
449  *
450  * @retval
451  * #double On success, the function returns the principal value of the arc tangent of x in radians;
452  *the return value is in the range [-pi/2, pi/2].\n
453  * If x is a NaN, a NaN is returned.\n
454  * If x is +0 (-0), +0 (-0) is returned.\n
455  * If x is positive infinity (negative infinity), +pi/2 (-pi/2) is returned.
456  *
457  * @par Dependency:
458  * <ul><li>math.h</li></ul>
459  *
460  * @see  acos | asin | atan2 | cos | sin | tan
461  *
462  */
463 double      atan(double);
464 
465 /**
466  * @ingroup  math
467  * @par Description:
468  * This function calculates the principal value of the arc tangent of x; that is the value whose tangent is x.
469  *
470  * @attention
471  * <ul>
472  * <li> None.</li>
473  * </ul>
474  *
475  * @retval
476  * #float On success, the function returns the principal value of the arc tangent of x in radians;
477  * the return value is in the range [-pi/2, pi/2].\n
478  * If x is a NaN, a NaN is returned.\n
479  * If x is +0 (-0), +0 (-0) is returned.\n
480  * If x is positive infinity (negative infinity), +pi/2 (-pi/2) is returned.\n
481  *
482  * @par Dependency:
483  * <ul><li>math.h</li></ul>
484  *
485  * @see acos | asin | atan2 | cos | sin | tan
486  *
487  */
488 float       atanf(float);
489 
490 /**
491  * @ingroup  math
492  * @par Description:
493  * This function calculates the principal value of the arc tangent of x; that is the value whose tangent is x.
494  *
495  * @attention
496  * <ul>
497  * <li> None.</li>
498  * </ul>
499  *
500  * @retval "long double" On success, the function returns the principal value of the arc tangent of x in radians; the return value is in the range [-pi/2, pi/2].\n
501  * If x is a NaN, a NaN is returned.\n
502  * If x is +0 (-0), +0 (-0) is returned.\n
503  * If x is positive infinity (negative infinity), +pi/2 (-pi/2) is returned.\n
504  *
505  * @par Dependency:
506  * <ul><li>math.h</li></ul>
507  *
508  * @see  acos | asin | atan2 | cos | sin | tan
509  *
510  */
511 long double atanl(long double);
512 
513 /**
514  * @ingroup  math
515  * @par Description:
516  * This function calculates the principal value of the arc tangent of y/x,
517  * using the signs of the two arguments to determine the quadrant of the result.
518  *
519  * @attention
520  * <ul>
521  * <li>None.</li>
522  * </ul>
523  *
524  * @retval
525  * #double  On success, these functions return the principal value of the arc tangent
526  * of y/x in radians; the return value is in the range [-pi, pi].\n
527  * If y is +0 (-0) and x is less than 0, +pi (-pi) is returned.\n
528  * If y is +0 (-0) and x is greater than 0, +0 (-0) is returned.\n
529  * If y is less than 0 and x is +0 or -0, -pi/2 is returned.\n
530  * If y is greater than 0 and x is +0 or -0, pi/2 is returned.\n
531  * If either x or y is NaN, a NaN is returned.\n
532  * If y is +0 (-0) and x is -0, +pi (-pi) is returned.\n
533  * If y is +0 (-0) and x is +0, +0 (-0) is returned.\n
534  * If y is a finite value greater (less) than 0, and x is negative infinity, +pi (-pi) is returned.\n
535  * If y is a finite value greater (less) than 0, and x is positive infinity, +0 (-0) is returned.\n
536  * If y is positive infinity (negative infinity), and x is finite, pi/2 (-pi/2) is returned.\n
537  * If y is positive infinity (negative infinity) and x is negative infinity, +3 *pi/4 (-3 *pi/4) is returned.\n
538  * If y is positive infinity (negative infinity) and x is positive infinity, +pi/4 (-pi/4) is returned.
539  *
540  * @par Dependency:
541  * <ul><li>math.h</li></ul>
542  *
543  * @see  acos | asin | atan | cos | sin | tan
544  *
545  */
546 double      atan2(double, double);
547 
548 /**
549  * @ingroup  math
550  * @par Description:
551  * This function calculates the principal value of the arc tangent of y/x,
552  * using the signs of the two arguments to determine the quadrant of the result.
553  *
554  * @attention
555  * <ul>
556  * <li> None.</li>
557  * </ul>
558  *
559  * @retval
560  * #float  On success, the function returns the principal value of the arc tangent of y/x in radians;
561  * the return value is in the range [-pi, pi].\n
562  * If y is +0 (-0) and x is less than 0, +pi (-pi) is returned.\n
563  * If y is +0 (-0) and x is greater than 0, +0 (-0) is returned.\n
564  * If y is less than 0 and x is +0 or -0, -pi/2 is returned.\n
565  * If y is greater than 0 and x is +0 or -0, pi/2 is returned.\n
566  * If either x or y is NaN, a NaN is returned.\n
567  * If y is +0 (-0) and x is -0, +pi (-pi) is returned.\n
568  * If y is +0 (-0) and x is +0, +0 (-0) is returned.\n
569  * If y is a finite value greater (less) than 0, and x is negative infinity, +pi (-pi) is returned.\n
570  * If y is a finite value greater (less) than 0, and x is positive infinity, +0 (-0) is returned.\n
571  * If y is positive infinity (negative infinity), and x is finite, pi/2 (-pi/2) is returned.\n
572  * If y is positive infinity (negative infinity) and x is negative infinity, +3 *pi/4 (-3 *pi/4) is returned.\n
573  * If y is positive infinity (negative infinity) and x is positive infinity, +pi/4 (-pi/4) is returned.\n
574  *
575  * @par Dependency:
576  * <ul><li>math.h</li></ul>
577  *
578  * @see acos | asin | atan | cos | sin | tan
579  *
580  */
581 float       atan2f(float, float);
582 
583 /**
584  * @ingroup  math
585  * @par Description:
586  * This function calculates the principal value of the arc tangent of y/x,
587  * using the signs of the two arguments to determine the quadrant of the result.
588  *
589  * @attention
590  * <ul>
591  * <li> None.</li>
592  * </ul>
593  *
594  * @retval "long double"  On success, these functions return the principal value of the arc tangent of y/x in radians;
595  * the return value is in the range [-pi, pi].\n
596  * If y is +0 (-0) and x is less than 0, +pi (-pi) is returned.\n
597  * If y is +0 (-0) and x is greater than 0, +0 (-0) is returned.\n
598  * If y is less than 0 and x is +0 or -0, -pi/2 is returned.\n
599  * If y is greater than 0 and x is +0 or -0, pi/2 is returned.\n
600  * If either x or y is NaN, a NaN is returned.\n
601  * If y is +0 (-0) and x is -0, +pi (-pi) is returned.\n
602  * If y is +0 (-0) and x is +0, +0 (-0) is returned.\n
603  * If y is a finite value greater (less) than 0, and x is negative infinity, +pi (-pi) is returned.\n
604  * If y is a finite value greater (less) than 0, and x is positive infinity, +0 (-0) is returned.\n
605  * If y is positive infinity (negative infinity), and x is finite, pi/2 (-pi/2) is returned.\n
606  * If y is positive infinity (negative infinity) and x is negative infinity, +3 *pi/4 (-3 *pi/4) is returned.\n
607  * If y is positive infinity (negative infinity) and x is positive infinity, +pi/4 (-pi/4) is returned.\n
608  *
609  * @par Dependency:
610  * <ul><li>math.h</li></ul>
611  *
612  * @see  acos | asin | atan | cos | sin | tan
613  *
614  */
615 long double atan2l(long double, long double);
616 
617 /**
618  * @ingroup  math
619  * @par Description:
620  * This function calculates the inverse hyperbolic tangent of x; that is the value whose hyperbolic tangent is x.
621  *
622  * @attention
623  * <ul>
624  * <li> None.</li>
625  * </ul>
626  *
627  * @retval
628  * #double  On success, this function returns the inverse hyperbolic tangent of x.\n
629  * If x is a NaN, a NaN is returned.\n
630  * If x is +0 (-0), +0 (-0) is returned.\n
631  * If x is +1 or -1, a pole error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL,
632  * respectively, with the mathematically correct sign.\n
633  * If the absolute value of x is greater than 1, a domain error occurs, and a NaN is returned.\n
634  *
635  * @par Dependency:
636  * <ul><li>math.h</li></ul>
637  * @see  acosh | asinh | cosh | sinh | tanh
638  *
639  */
640 double      atanh(double);
641 
642 /**
643  * @ingroup  math
644  * @par Description:
645  * This function calculates the inverse hyperbolic tangent of x; that is the value whose hyperbolic tangent is x.
646  *
647  * @attention
648  * <ul>
649  * <li>None.</li>
650  * </ul>
651  *
652  * @retval
653  * #float On success, this function returns the inverse hyperbolic tangent of x.\n
654  * If x is a NaN, a NaN is returned.\n
655  * If x is +0 (-0), +0 (-0) is returned.\n
656  * If x is +1 or -1, a pole error occurs, and the functions return HUGE_VAL,
657  * HUGE_VALF, or HUGE_VALL, respectively, with the mathematically correct sign.\n
658  * If the absolute value of x is greater than 1, a domain error occurs, and a NaN is returned.\n
659  *
660  * @par Dependency:
661  * <ul><li>math.h</li></ul>
662  * @see  acosh | asinh | cosh | sinh | tanh
663  *
664  */
665 float       atanhf(float);
666 
667 /**
668  * @ingroup  math
669  * @par Description:
670  * This function calculates the inverse hyperbolic tangent of x; that is the value whose hyperbolic tangent is x.
671  *
672  * @attention
673  * <ul>
674  * <li> None.</li>
675  * </ul>
676  *
677  * @retval "long double"  On success, this function returns the inverse hyperbolic tangent of x.\n
678  * If x is a NaN, a NaN is returned.\n
679  * If x is +0 (-0), +0 (-0) is returned.\n
680  * If x is +1 or -1, a pole error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the mathematically correct sign.\n
681  * If the absolute value of x is greater than 1, a domain error occurs, and a NaN is returned.\n
682  *
683  * @par Dependency:
684  * <ul><li>math.h</li></ul>
685  * @see  acosh | asinh | cosh | sinh | tanh
686  *
687  */
688 long double atanhl(long double);
689 
690 /**
691  * @ingroup  math
692  * @par Description:
693  * This function returns the (real) cube root of x. This function cannot fail; every representable
694  * real value has a representable real cube root.
695  *
696  * @attention
697  * <ul>
698  * <li> None.</li>
699  * </ul>
700  *
701  * @retval
702  * #double  On success, this function returns the cube root of x.\n
703  * If x is +0, -0, positive infinity, negative infinity, or NaN, x is returned.\n
704  *
705  * @par Dependency:
706  * <ul><li>math.h</li></ul>
707  *
708  * @see  pow | sqrt
709  *
710  */
711 double      cbrt(double);
712 
713 /**
714  * @ingroup  math
715  * @par Description:
716  * This function returns the (real) cube root of x. This function cannot fail; every
717  * representable real value has a representable real cube root.
718  *
719  * @attention
720  * <ul>
721  * <li>None.</li>
722  * </ul>
723  *
724  * @retval
725  * #float On success, this function returns the cube root of x.\n
726  * If x is +0, -0, positive infinity, negative infinity, or NaN, x is returned.\n
727  *
728  * @par Dependency:
729  * <ul><li>math.h</li></ul>
730  * @see  pow | sqrt
731  *
732  */
733 float       cbrtf(float);
734 
735 /**
736  * @ingroup  math
737  * @par Description:
738  * This function returns the (real) cube root of x. This function cannot fail; every representable real value has a representable real cube root.
739  *
740  * @attention
741  * <ul>
742  * <li> None.</li>
743  * </ul>
744  *
745  * @retval "long double"  On success, this function returns the cube root of x.\n
746  * If x is +0, -0, positive infinity, negative infinity, or NaN, x is returned.\n
747  *
748  * @par Dependency:
749  * <ul><li>math.h</li></ul>
750  *
751  * @see  pow | sqrt
752  *
753  */
754 long double cbrtl(long double);
755 
756 /**
757  * @ingroup  math
758  * @par Description:
759  * This function returns the smallest integral value that is not less than x.
760  *
761  * @attention
762  * <ul>
763  * <li>None.</li>
764  * </ul>
765  *
766  * @retval
767  * #double This function returns the ceiling of x.\n
768  * If x is integral, +0, -0, NaN, or infinite, x itself is returned.\n
769  *
770  * @par Dependency:
771  * <ul><li>math.h</li></ul>
772  * @see  floor | lrint | nearbyint | rint | round | trunc
773  *
774  */
775 double      ceil(double);
776 
777 /**
778  * @ingroup  math
779  * @par Description:
780  * This function returns the smallest integral value that is not less than x.
781  *
782  * @retval
783  * #float  This function returns the ceiling of x.\n
784  * If x is integral, +0, -0, NaN, or infinite, x itself is returned.\n
785  *
786  * @par Dependency:
787  * <ul><li>math.h</li></ul>
788  * @see  floor | lrint | nearbyint | rint | round | trunc
789  *
790  */
791 float       ceilf(float);
792 
793 /**
794  * @ingroup  math
795  * @par Description:
796  * This function returns the smallest integral value that is not less than x.
797  *
798  * @attention
799  * <ul>
800  * <li>None.</li>
801  * </ul>
802  *
803  * @retval "long double" This function returns the ceiling of x.\n
804  * If x is integral, +0, -0, NaN, or infinite, x itself is returned.\n
805  *
806  * @par Dependency:
807  * <ul><li>math.h</li></ul>
808  * @see  floor | lrint | nearbyint | rint | round | trunc
809  *
810  */
811 long double ceill(long double);
812 
813 /**
814  * @ingroup  math
815  * @par Description:
816  * This function returns a value whose absolute value matches that of x,
817  * but whose sign bit matches that of y.
818  * For example, copysign(42.0, -1.0) and copysign(-42.0, -1.0) both return -42.0.
819  *
820  * @attention
821  * <ul>
822  * <li> None.</li>
823  * </ul>
824  *
825  * @retval
826  * #double  On success, this function returns a value whose magnitude is taken from x
827  * and whose sign is taken from y.\n
828  * If x is a NaN, a NaN with the sign bit of y is returned.\n
829  *
830  * @par Dependency:
831  * <ul><li>math.h</li></ul>
832  *
833  * @see  signbit
834  *
835  */
836 double      copysign(double, double);
837 
838 /**
839  * @ingroup  math
840  * @par Description:
841  * This function returns a value whose absolute value matches that of x,
842  * but whose sign bit matches that of y.
843  *
844  * @attention
845  * <ul>
846  * <li> None.</li>
847  * </ul>
848  *
849  * @retval
850  * #float  On success, this function returns a value whose magnitude is taken from x
851  * and whose sign is taken from y.\n
852  * If x is a NaN, a NaN with the sign bit of y is returned.\n
853  *
854  * @par Dependency:
855  * <ul><li>math.h</li></ul>
856  *
857  * @see  signbit
858  *
859  */
860 float       copysignf(float, float);
861 
862 /**
863  * @ingroup  math
864  * @par Description:
865  * This function returns a value whose absolute value matches that of x,
866  * but whose sign bit matches that of y.
867  *
868  * @attention
869  * <ul>
870  * <li> None.</li>
871  * </ul>
872  *
873  * @retval "long double"  On success, this function returns a value whose magnitude is taken from x
874  * and whose sign is taken from y.\n
875  * If x is a NaN, a NaN with the sign bit of y is returned.\n
876  *
877  * @par Dependency:
878  * <ul><li>math.h</li></ul>
879  *
880  * @see  signbit
881  *
882  */
883 long double copysignl(long double, long double);
884 
885 /**
886  * @ingroup  math
887  * @par Description:
888  * This function returns the cosine of x, where x is given in radians.
889  *
890  * @attention
891  * <ul>
892  * <li> None.</li>
893  * </ul>
894  *
895  * @retval
896  * #double  On success, this function returns the cosine of x.\n
897  * If x is a NaN, a NaN is returned.\n
898  * If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned.
899  *
900  * @par Dependency:
901  * <ul><li>math.h</li></ul>
902  *
903  * @see  acos | asin | atan | atan2 | sin | sincos | tan
904  *
905  */
906 double      cos(double);
907 
908 /**
909  * @ingroup  math
910  * @par Description:
911  * This function returns the cosine of x, where x is given in radians.
912  *
913  * @attention
914  * <ul>
915  * <li> None.</li>
916  * </ul>
917  *
918  * @retval
919  * #float On success, this function return the cosine of x.\n
920  * If x is a NaN, a NaN is returned.\n
921  * If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned.\n
922  *
923  * @par Dependency:
924  * <ul><li>math.h</li></ul>
925  *
926  * @see  acos | asin | atan | atan2 | sin | sincos | tan
927  *
928  */
929 float       cosf(float);
930 
931 /**
932  * @ingroup  math
933  * @par Description:
934  * This function returns the cosine of x, where x is given in radians.
935  *
936  * @attention
937  * <ul>
938  * <li> None.</li>
939  * </ul>
940  *
941  * @retval "long double"  On success, this function returns the cosine of x.\n
942  * If x is a NaN, a NaN is returned.\n
943  * If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned.\n
944  *
945  * @par Dependency:
946  * <ul><li>math.h</li></ul>
947  *
948  * @see  acos | asin | atan | atan2 | sin | sincos | tan
949  *
950  */
951 long double cosl(long double);
952 
953 /**
954  * @ingroup  math
955  * @par Description:
956  * This function returns the hyperbolic cosine of x, which is defined mathematically as:
957  * cosh(x) = (exp(x) + exp(-x)) / 2
958  *
959  * @attention
960  * <ul>
961  * <li> None.</li>
962  * </ul>
963  *
964  * @retval
965  * #double On success, this function return the hyperbolic cosine of x.\n
966  * If x is a NaN, a NaN is returned.\n
967  * If x is +0 or -0, 1 is returned.\n
968  * If x is positive infinity or negative infinity, positive infinity is returned.\n
969  * If the result overflows, a range error occurs, and the functions return +HUGE_VAL,
970  * +HUGE_VALF, or +HUGE_VALL, respectively.\n
971  *
972  * @par Dependency:
973  * <ul><li>math.h</li></ul>
974  *
975  * @see  acosh | asinh | atanh | sinh | tanh
976  *
977  */
978 double      cosh(double);
979 
980 /**
981  * @ingroup  math
982  * @par Description:
983  * This function returns the hyperbolic cosine of x, which is defined mathematically as:
984  * cosh(x) = (exp(x) + exp(-x)) / 2
985  *
986  * @attention
987  * <ul>
988  * <li> None.</li>
989  * </ul>
990  *
991  * @retval
992  * #float  On success, this function return the hyperbolic cosine of x.\n
993  * If x is a NaN, a NaN is returned.\n
994  * If x is +0 or -0, 1 is returned.\n
995  * If x is positive infinity or negative infinity, positive infinity is returned.\n
996  * If the result overflows, a range error occurs, and the functions return +HUGE_VAL,
997  * +HUGE_VALF, or +HUGE_VALL, respectively.\n
998  *
999  * @par Dependency:
1000  * <ul><li>math.h</li></ul>
1001  *
1002  * @see acosh | asinh | atanh | sinh | tanh
1003  *
1004  */
1005 float       coshf(float);
1006 
1007 /**
1008  * @ingroup  math
1009  * @par Description:
1010  * This function returns the hyperbolic cosine of x, which is defined mathematically as:
1011  * cosh(x) = (exp(x) + exp(-x)) / 2
1012  *
1013  * @attention
1014  * <ul>
1015  * <li> None.</li>
1016  * </ul>
1017  *
1018  * @retval "long double" On success, this function return the hyperbolic cosine of x.\n
1019  * If x is a NaN, a NaN is returned.\n
1020  * If x is +0 or -0, 1 is returned.\n
1021  * If x is positive infinity or negative infinity, positive infinity is returned.\n
1022  * If the result overflows, a range error occurs, and the functions return +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL, respectively.\n
1023  *
1024  * @par Dependency:
1025  * <ul><li>math.h</li></ul>
1026  *
1027  * @see  acosh | asinh | atanh | sinh | tanh
1028  *
1029  */
1030 long double coshl(long double);
1031 
1032 /**
1033  * @ingroup  math
1034  * @par Description:
1035  * This function returns the error function of x, defined as erf(x) = 2/sqrt(pi) * integral
1036  * from 0 to x of exp(-t *t) dt.
1037  *
1038  * @attention
1039  * <ul>
1040  * <li>None.</li>
1041  * </ul>
1042  *
1043  * @retval
1044  * #double  On success, this function returns the error function of x, a value in the range [-1, 1].\n
1045  * If x is a NaN, a NaN is returned.\n
1046  * If x is +0 (-0), +0 (-0) is returned.\n
1047  * If x is positive infinity (negative infinity), +1 (-1) is returned.\n
1048  * If x is subnormal, a range error occurs, and the return value is 2 *x/sqrt(pi).\n
1049  *
1050  * @par Dependency:
1051  * <ul><li>math.h</li></ul>
1052  *
1053  * @see  erfc | exp
1054  *
1055  */
1056 double      erf(double);
1057 
1058 /**
1059  * @ingroup  math
1060  * @par Description:
1061  * This function returns the error function of x.
1062  *
1063  * @attention
1064  * <ul>
1065  * <li>None.</li>
1066  * </ul>
1067  *
1068  * @retval
1069  * #float  On success, this function returns the error function of x, a value in the range [-1, 1].\n
1070  * If x is a NaN, a NaN is returned.\n
1071  * If x is +0 (-0), +0 (-0) is returned.\n
1072  * If x is positive infinity (negative infinity), +1 (-1) is returned.\n
1073  * If x is subnormal, a range error occurs, and the return value is 2 *x/sqrt(pi).\n
1074  *
1075  * @par Dependency:
1076  * <ul><li>math.h</li></ul>
1077  *
1078  * @see  erfc | exp
1079  *
1080  */
1081 float       erff(float);
1082 
1083 /**
1084  * @ingroup  math
1085  * @par Description:
1086  * This function returns the error function of x, defined as erf(x) = 2/sqrt(pi) * integral from 0 to x of exp(-t *t) dt.
1087  *
1088  * @attention
1089  * <ul>
1090  * <li> The erfc(), erfcf(), and erfcl() functions are provided to avoid the loss accuracy that would occur for the calculation 1-erf(x) for large values of x
1091  * (for  which the value of erf(x) approaches 1).</li>
1092  * </ul>
1093  *
1094  * @retval "long double"  On success, this function returns the error function of x, a value in the range [-1, 1].\n
1095  * If x is a NaN, a NaN is returned.\n
1096  * If x is +0 (-0), +0 (-0) is returned.\n
1097  * If x is positive infinity (negative infinity), +1 (-1) is returned.\n
1098  * If x is subnormal, a range error occurs, and the return value is 2 *x/sqrt(pi).\n
1099  *
1100  * @par Dependency:
1101  * <ul><li>math.h</li></ul>
1102  *
1103  * @see  erfc | exp
1104  *
1105  */
1106 long double erfl(long double);
1107 
1108 /**
1109  * @ingroup  math
1110  * @par Description:
1111  * This function returns the complementary error function of x, that is, 1.0 - erf(x).
1112  *
1113  * @attention
1114  * <ul>
1115  * <li> The erfc(), erfcf(), and erfcl() functions are provided to avoid the loss accuracy
1116  * that would occur for the calculation 1-erf(x) for large values of x
1117  * (for which the value of erf(x) approaches 1).</li>
1118  * </ul>
1119  *
1120  * @retval
1121  * #double  On success, this function returns the complementary error function of x, a value in the range [0,2].\n
1122  * If x is a NaN, a NaN is returned.\n
1123  * If x is +0 or -0, 1 is returned.\n
1124  * If x is positive infinity, +0 is returned.\n
1125  * If x is negative infinity, +2 is returned.\n
1126  * If the function result underflows and produces an unrepresentable value, the return value is 0.0.\n
1127  * If the function result underflows but produces a representable (i.e., subnormal) value,
1128  * that value is returned, and a range error occurs.\n
1129  *
1130  * @par Dependency:
1131  * <ul><li>math.h</li></ul>
1132  *
1133  * @see  erf | exp
1134  *
1135  */
1136 double      erfc(double);
1137 
1138 /**
1139  * @ingroup  math
1140  * @par Description:
1141  * This function returns the complementary error function of x, that is, 1.0 - erf(x).
1142  *
1143  * @attention
1144  * <ul>
1145  * <li>None.</li>
1146  * </ul>
1147  *
1148  * @retval
1149  * #float  On success, this function returns the complementary error function of x, a value in the range [0,2].\n
1150  * If x is a NaN, a NaN is returned.\n
1151  * If x is +0 or -0, 1 is returned.\n
1152  * If x is positive infinity, +0 is returned.\n
1153  * If x is negative infinity, +2 is returned.\n
1154  * If the function result underflows and produces an unrepresentable value, the return value is 0.0.\n
1155  * If the function result underflows but produces a representable (i.e., subnormal) value,
1156  * that value is returned, and a range error occurs.\n
1157  *
1158  * @par Dependency:
1159  * <ul><li>math.h</li></ul>
1160  *
1161  * @see  erf | exp
1162  *
1163  */
1164 float       erfcf(float);
1165 
1166 /**
1167  * @ingroup  math
1168  * @par Description:
1169  * This function returns the complementary error function of x, that is, 1.0 - erf(x).
1170  *
1171  * @attention
1172  * <ul>
1173  * <li> The erfc(), erfcf(), and erfcl() functions are provided to avoid the loss accuracy that would occur for the calculation 1-erf(x) for large values of x
1174  * (for which the value of erf(x) approaches 1).</li>
1175  * </ul>
1176  *
1177  * @retval "long double"  On success, this function returns the complementary error function of x, a value in the range [0,2].\n
1178  * If x is a NaN, a NaN is returned.\n
1179  * If x is +0 or -0, 1 is returned.\n
1180  * If x is positive infinity, +0 is returned.\n
1181  * If x is negative infinity, +2 is returned.\n
1182  * If the function result underflows and produces an unrepresentable value, the return value is 0.0.\n
1183  * If the function result underflows but produces a representable (i.e., subnormal) value, that value is returned, and a range error occurs.\n
1184  *
1185  * @par Dependency:
1186  * <ul><li>math.h</li></ul>
1187  *
1188  * @see  erf | exp
1189  *
1190  */
1191 long double erfcl(long double);
1192 
1193 /**
1194  * @ingroup  math
1195  * @par Description:
1196  * This function returns the value of e (the base of natural logarithms) raised to the power of x.
1197  *
1198  * @attention
1199  * <ul>
1200  * <li> None.</li>
1201  * </ul>
1202  *
1203  * @retval
1204  * #double  On success, this function returns the exponential value of x.\n
1205  * If x is a NaN, a NaN is returned.\n
1206  * If x is positive infinity, positive infinity is returned.\n
1207  * If x is negative infinity, +0 is returned.\n
1208  * If the result underflows, a range error occurs, and zero is returned.\n
1209  * If the result overflows, a range error occurs, and the functions return +HUGE_VAL, +HUGE_VALF,
1210  * or +HUGE_VALL, respectively.\n
1211  *
1212  * @par Dependency:
1213  * <ul><li>math.h</li></ul>
1214  *
1215  * @see  cbrt | exp2 | sqrt
1216  *
1217  */
1218 double      exp(double);
1219 
1220 /**
1221  * @ingroup  math
1222  * @par Description:
1223  * This function returns the value of e (the base of natural logarithms) raised to the power of x.
1224  *
1225  * @attention
1226  * <ul>
1227  * <li> None.</li>
1228  * </ul>
1229  *
1230  * @retval
1231  * #float On success, this function returns the exponential value of x.\n
1232  * If x is a NaN, a NaN is returned.\n
1233  * If x is positive infinity, positive infinity is returned.\n
1234  * If x is negative infinity, +0 is returned.\n
1235  * If the result underflows, a range error occurs, and zero is returned.\n
1236  * If the result overflows, a range error occurs, and the functions return +HUGE_VAL,
1237  * +HUGE_VALF, or +HUGE_VALL, respectively.\n
1238  *
1239  * @par Dependency:
1240  * <ul><li>math.h</li></ul>
1241  *
1242  * @see  cbrt | exp | exp2 | sqrt
1243  *
1244  */
1245 float       expf(float);
1246 
1247 /**
1248  * @ingroup  math
1249  * @par Description:
1250  * This function returns the value of e (the base of natural logarithms) raised to the power of x.
1251  *
1252  * @attention
1253  * <ul>
1254  * <li> None.</li>
1255  * </ul>
1256  *
1257  * @retval "long double"  On success, this function returns the exponential value of x.\n
1258  * If x is a NaN, a NaN is returned.\n
1259  * If x is positive infinity, positive infinity is returned.\n
1260  * If x is negative infinity, +0 is returned.\n
1261  * If the result underflows, a range error occurs, and zero is returned.\n
1262  * If the result overflows, a range error occurs, and the functions return +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL, respectively.\n
1263  *
1264  * @par Dependency:
1265  * <ul><li>math.h</li></ul>
1266  *
1267  * @see  cbrt | exp | exp2 | sqrt
1268  *
1269  */
1270 long double expl(long double);
1271 
1272 /**
1273  * @ingroup  math
1274  * @par Description:
1275  * This function returns the value of 2 raised to the power of x.
1276  *
1277  * @attention
1278  * <ul>
1279  * <li>None.</li>
1280  * </ul>
1281  *
1282  * @retval
1283  * #double On success, the function returns the base-2 exponential value of x.\n
1284  * For various special cases, including the handling of infinity and NaN, as well as
1285  * overflows and underflows, see exp().\n
1286  *
1287  * @par Dependency:
1288  * <ul><li>math.h</li></ul>
1289  *
1290  * @see cbrt | exp | sqrt
1291  *
1292  */
1293 double      exp2(double);
1294 float       exp2f(float);
1295 long double exp2l(long double);
1296 
1297 /**
1298  * @ingroup  math
1299  * @par Description:
1300  * The function returns a value equivalent to
1301  * exp(x) - 1
1302  * The result is computed in a way that is accurate even if the value of x is near zero.
1303  *
1304  * @attention
1305  * <ul>
1306  * <li> None.</li>
1307  * </ul>
1308  *
1309  * @retval
1310  * #double  On success, this function returns exp(x) - 1.\n
1311  * If x is a NaN, a NaN is returned.\n
1312  * If x is +0 (-0), +0 (-0) is returned.\n
1313  * If x is positive infinity, positive infinity is returned.\n
1314  * If x is negative infinity, -1 is returned.\n
1315  * If the result overflows, a range error occurs, and the function returns -HUGE_VAL,
1316  * -HUGE_VALF, or -HUGE_VALL, respectively.\n
1317  *
1318  * @par Dependency:
1319  * <ul><li>math.h</li></ul>
1320  *
1321  * @see exp | log | log1p
1322  *
1323  */
1324 double      expm1(double);
1325 
1326 /**
1327  * @ingroup  math
1328  * @par Description:
1329  * The function returns a value equivalent to
1330  * exp(x) - 1
1331  * The result is computed in a way that is accurate even if the value of x is near zero-a case where exp(x)-1  would
1332  * be inaccurate due to subtraction of two numbers that are nearly equal.
1333  *
1334  * @attention
1335  * <ul>
1336  * <li> None.</li>
1337  * </ul>
1338  *
1339  * @retval
1340  * #float  On success, this function returns exp(x) - 1.\n
1341  * If x is a NaN, a NaN is returned.\n
1342  * If x is +0 (-0), +0 (-0) is returned.\n
1343  * If x is positive infinity, positive infinity is returned.\n
1344  * If x is negative infinity, -1 is returned.\n
1345  * If the result overflows, a range error occurs, and the function returns -HUGE_VAL,
1346  * -HUGE_VALF, or -HUGE_VALL, respectively.\n
1347  *
1348  * @par Dependency:
1349  * <ul><li>math.h</li></ul>
1350  *
1351  * @see exp | log | log1p
1352  *
1353  */
1354 float       expm1f(float);
1355 long double expm1l(long double);
1356 
1357 /**
1358  * @ingroup  math
1359  * @par Description:
1360  * This function returns the absolute value of the floating-point number x.
1361  *
1362  * @attention
1363  * <ul>
1364  * <li> None.</li>
1365  * </ul>
1366  *
1367  * @retval
1368  * #double  This function returns the absolute value of x.\n
1369  * If x is a NaN, a NaN is returned.\n
1370  * If x is -0, +0 is returned.\n
1371  * If x is negative infinity or positive infinity, positive infinity is returned.\n
1372  *
1373  * @par Dependency:
1374  * <ul><li>math.h</li></ul>
1375  *
1376  * @see  ceil | floor | rint
1377  *
1378  */
1379 double      fabs(double);
1380 
1381 /**
1382  * @ingroup  math
1383  * @par Description:
1384  * This function returns the absolute value of the floating-point number x.
1385  *
1386  * @retval
1387  * #float This function returns the absolute value of x.\n
1388  * If x is a NaN, a NaN is returned.\n
1389  * If x is -0, +0 is returned.\n
1390  * If x is negative infinity or positive infinity, positive infinity is returned.\n
1391  *
1392  * @par Dependency:
1393  * <ul><li>math.h</li></ul>
1394  * @see ceil | floor | rint
1395  *
1396  */
1397 float       fabsf(float);
1398 
1399 /**
1400  * @ingroup  math
1401  * @par Description:
1402  * This function returns the absolute value of the floating-point number x.
1403  *
1404  * @retval "long double" This function returns the absolute value of x.\n
1405  * If x is a NaN, a NaN is returned.\n
1406  * If x is -0, +0 is returned.\n
1407  * If x is negative infinity or positive infinity, positive infinity is returned.\n
1408  *
1409  * @par Dependency:
1410  * <ul><li>math.h</li></ul>
1411  * @see ceil | floor | rint
1412  *
1413  */
1414 long double fabsl(long double);
1415 
1416 double      fdim(double, double);
1417 float       fdimf(float, float);
1418 long double fdiml(long double, long double);
1419 
1420 /**
1421  * @ingroup  math
1422  * @par Description:
1423  * This function returns the largest integral value that is not greater than x.
1424  *
1425  * @attention
1426  * <ul>
1427  * <li> None.</li>
1428  * </ul>
1429  *
1430  * @retval
1431  * #double This function returns the floor of x.\n
1432  * If x is integral, +0, -0, NaN, or an infinity, x itself is returned.\n
1433  *
1434  * @par Dependency:
1435  * <ul><li>math.h</li></ul>
1436  *
1437  * @see ceil | lrint | nearbyint | rint | round | trunc
1438  *
1439  */
1440 double      floor(double);
1441 
1442 /**
1443  * @ingroup  math
1444  * @par Description:
1445  * This function returns the largest integral value that is not greater than x.
1446  *
1447  * @attention
1448  * <ul>
1449  * <li>None.</li>
1450  * </ul>
1451  *
1452  * @retval
1453  * #float  This function returns the floor of x.\n
1454  * If x is integral, +0, -0, NaN, or an infinity, x itself is returned.\n
1455  *
1456  * @par Dependency:
1457  * <ul><li>math.h</li></ul>
1458  *
1459  * @see ceil | lrint | nearbyint | rint | round | trunc
1460  *
1461  */
1462 float       floorf(float);
1463 
1464 /**
1465  * @ingroup  math
1466  * @par Description:
1467  * This function returns the largest integral value that is not greater than x.
1468  *
1469  * @attention
1470  * <ul>
1471  * <li>None.</li>
1472  * </ul>
1473  *
1474  * @retval "long double" this function returns the floor of x. If x is integral, +0, -0, NaN, or an infinity, x itself is returned.
1475  *
1476  * @par Dependency:
1477  * <ul><li>math.h</li></ul>
1478  *
1479  * @see  ceil | lrint | nearbyint | rint | round | trunc
1480  *
1481  */
1482 long double floorl(long double);
1483 
1484 double      fma(double, double, double);
1485 float       fmaf(float, float, float);
1486 long double fmal(long double, long double, long double);
1487 
1488 double      fmax(double, double);
1489 float       fmaxf(float, float);
1490 long double fmaxl(long double, long double);
1491 
1492 double      fmin(double, double);
1493 float       fminf(float, float);
1494 long double fminl(long double, long double);
1495 
1496 /**
1497  * @ingroup  math
1498  * @par Description:
1499  * The function computes the floating-point remainder of dividing x by div. The return value is x - n * div,
1500  * where n is the quotient of x / div, rounded toward zero to an integer.
1501  *
1502  * @attention
1503  * <ul>
1504  * <li> None.</li>
1505  * </ul>
1506  *
1507  * @retval
1508  * #double  On success, the function returns the value x - n *div, for some integer n,
1509  * such that the returned value has the same sign as x and a magnitude less than
1510  * the magnitude of div.\n
1511  * If x or div is a NaN, a NaN is returned.\n
1512  * If x is an infinity, a domain error occurs, and a NaN is returne.\n
1513  * If div is zero, a domain error occurs, and a NaN is returned.\n
1514  * If x is +0 (-0), and div is not zero, +0 (-0) is returned.\n
1515  *
1516  * @par Dependency:
1517  * <ul><li>math.h</li></ul>
1518  *
1519  * @see  remainder
1520  *
1521  */
1522 double      fmod(double, double);
1523 
1524 /**
1525  * @ingroup  math
1526  * @par Description:
1527  * The function computes the floating-point remainder of dividing x by div. The return value is x - n * div,
1528  * where n is the quotient of x / div, rounded toward zero to an integer.
1529  *
1530  * @attention
1531  * <ul>
1532  * <li>None.</li>
1533  * </ul>
1534  *
1535  * @retval
1536  * #float On success, these functions return the value x - n *div, for some integer n,
1537  * such that the returned value has the same sign as x and a magnitude less than
1538  * the magnitude of div.\n
1539  * If x is a NaN, a NaN with the sign bit of div is returned.\n
1540  * If x is an infinity, a domain error occurs, and a NaN is returned.\n
1541  * If y is zero, a domain error occurs, and a NaN is returned.\n
1542  * If x is +0 (-0), and div is not zero, +0 (-0) is returned.\n
1543  *
1544  * @par Dependency:
1545  * <ul><li>math.h</li></ul>
1546  *
1547  * @see  remainder
1548  *
1549  */
1550 float       fmodf(float, float);
1551 
1552 /**
1553  * @ingroup  math
1554  * @par Description:
1555  * The function computes the floating-point remainder of dividing x by div. The return value is x - n * div,
1556  * where n is the quotient of x / div, rounded toward zero to an integer.
1557  *
1558  * @attention
1559  * <ul>
1560  * <li>None.</li>
1561  * </ul>
1562  *
1563  * @retval "long double" On success, these functions return the value x - n*div, for some integer n,
1564  * such that the returned value has the same sign as x and a magnitude less than
1565  * the magnitude of div.\n
1566  * If x is a NaN, a NaN with the sign bit of div is returned.\n
1567  * If x is an infinity, a domain error occurs, and a NaN is returned.\n
1568  * If y is zero, a domain error occurs, and a NaN is returned.\n
1569  * If x is +0 (-0), and div is not zero, +0 (-0) is returned.\n
1570  *
1571  * @par Dependency:
1572  * <ul><li>math.h</li></ul>
1573  *
1574  * @see  remainder
1575  *
1576  */
1577 long double fmodl(long double, long double);
1578 
1579 /**
1580  * @ingroup  math
1581  * @par Description:
1582  * This function is used to split the number x into a normalized fraction and an exponent which is stored in eptr.
1583  *
1584  * @attention
1585  * <ul>
1586  * <li> None.</li>
1587  * </ul>
1588  *
1589  * @retval
1590  * #double This function returns the normalized fraction. If the argument x is not zero, the normalized
1591  * fraction is x times a power of two, and its absolute
1592  * value is always in the range 1/2 (inclusive) to 1(exclusive), that is, [0.5,1).\n
1593  * If x is zero, then the normalized fraction is zero and zero is stored in eptr.\n
1594  * If x is a NaN, a NaN is returned, and the value of *eptr is unspecified.\n
1595  * If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned,
1596  * and the value of *eptr is unspecified.\n
1597  *
1598  * @par Dependency:
1599  * <ul><li>math.h</li></ul>
1600  *
1601  * @see  ldexp | modf
1602  *
1603  */
1604 double      frexp(double, int *);
1605 
1606 /**
1607  * @ingroup  math
1608  * @par Description:
1609  * This function is used to split the number x into a normalized fraction and an exponent which is stored in eptr.
1610  *
1611  * @attention
1612  * <ul>
1613  * <li> None.</li>
1614  * </ul>
1615  *
1616  * @retval
1617  * #float This function returns the normalized fraction. If the argument x is not zero,
1618  * the normalized fraction is x times a power of two, and its absolute
1619  * value is always in the range 1/2 (inclusive) to 1(exclusive), that is, [0.5,1).\n
1620  * If x is zero, then the normalized fraction is zero and zero is stored in eptr.\n
1621  * If x is a NaN, a NaN is returned, and the value of *eptr is unspecified.\n
1622  * If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned,
1623  * and the value of *eptr is unspecified.\n
1624  *
1625  * @par Dependency:
1626  * <ul><li>math.h</li></ul>
1627  *
1628  * @see  ldexp | modf
1629  *
1630  */
1631 float       frexpf(float, int *);
1632 
1633 /**
1634  * @ingroup  math
1635  * @par Description:
1636  * This function is used to split the number x into a normalized fraction and an exponent which is stored in eptr.
1637  *
1638  * @attention
1639  * <ul>
1640  * <li> None.</li>
1641  * </ul>
1642  *
1643  * @retval "long double" This function returns the normalized fraction. If the argument x is not zero, the normalized fraction is x times a power of two, and its absolute
1644  * value is always in the range 1/2 (inclusive) to 1(exclusive), that is, [0.5,1).\n
1645  * If x is zero, then the normalized fraction is zero and zero is stored in eptr.\n
1646  * If x is a NaN, a NaN is returned, and the value of *eptr is unspecified.\n
1647  * If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned, and the value of *eptr is unspecified.\n
1648  *
1649  * @par Dependency:
1650  * <ul><li>math.h</li></ul>
1651  *
1652  * @see  ldexp | modf
1653  *
1654  */
1655 long double frexpl(long double, int *);
1656 
1657 /**
1658  * @ingroup  math
1659  * @par Description:
1660  * The function returns sqrt(x *x+y *y). This is the length of the hypotenuse of a right-angled triangle
1661  * with sides of length x and y.
1662  *
1663  * @attention
1664  * <ul>
1665  * <li> None.</li>
1666  * </ul>
1667  *
1668  * @retval
1669  * #double  On success, this function returns the length of a right-angled triangle with sides of length x and y.\n
1670  * If x or y is an infinity, positive infinity is returned.\n
1671  * If x or y is a NaN, and the other argument is not an infinity, a NaN is returned.\n
1672  * If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF,
1673  * or HUGE_VALL, respectively.\n
1674  * If both arguments are subnormal, and the result is subnormal, a range error occurs,
1675  * and the correct result is returned.\n
1676  *
1677  * @par Dependency:
1678  * <ul><li>math.h</li></ul>
1679  *
1680  * @see sqrt
1681  *
1682  */
1683 double      hypot(double, double);
1684 float       hypotf(float, float);
1685 
1686 /**
1687  * @ingroup  math
1688  * @par Description:
1689  * The function returns sqrt(x*x+y*y). This is the length of the hypotenuse of a right-angled triangle
1690  * with sides of length x and y.
1691  *
1692  * @attention
1693  * <ul>
1694  * <li> None.</li>
1695  * </ul>
1696  *
1697  * @retval "long double"  On success, this function returns the length of a right-angled triangle with sides of length x and y.\n
1698  * If x or y is an infinity, positive infinity is returned.\n
1699  * If x or y is a NaN, and the other argument is not an infinity, a NaN is returned.\n
1700  * If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF,
1701  * or HUGE_VALL, respectively.\n
1702  * If both arguments are subnormal, and the result is subnormal, a range error occurs,
1703  * and the correct result is returned.\n
1704  *
1705  * @par Dependency:
1706  * <ul><li>math.h</li></ul>
1707  *
1708  * @see sqrt
1709  *
1710  */
1711 long double hypotl(long double, long double);
1712 
1713 int         ilogb(double);
1714 int         ilogbf(float);
1715 int         ilogbl(long double);
1716 
1717 /**
1718  * @ingroup  math
1719  * @par Description:
1720  * This function returns the result of multiplying the floating-point number x by 2 raised to the power n.
1721  *
1722  * @attention
1723  * <ul>
1724  * <li> None.</li>
1725  * </ul>
1726  *
1727  * @retval
1728  * #double  On success, this function return x * (2^n).\n
1729  * If n is zero, then x is returned.\n
1730  * If x is a NaN, a NaN is returned.\n
1731  * If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.\n
1732  * If the result underflows, a range error occurs, and zero is returned.\n
1733  * If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL,
1734  * respectively, with a sign the same as x.\n
1735  *
1736  * @par Dependency:
1737  * <ul><li>math.h</li></ul>
1738  *
1739  * @see  frexp | modf | scalbln
1740  *
1741  */
1742 double      ldexp(double, int);
1743 
1744 /**
1745  * @ingroup  math
1746  * @par Description:
1747  * This function returns the result of multiplying the floating-point number x by 2 raised to the power exp.
1748  *
1749  * @attention
1750  * <ul>
1751  * <li> None.</li>
1752  * </ul>
1753  *
1754  * @retval
1755  * #float  On success, this function return x * (2^exp).\n
1756  * If exp is zero, then x is returned.\n
1757  * If x is a NaN, a NaN is returned.\n
1758  * If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.\n
1759  * If the result underflows, a range error occurs, and zero is returned.\n
1760  * If the result overflows, a range error occurs, and the functions return
1761  * HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with a sign the same as x.\n
1762  *
1763  * @par Dependency:
1764  * <ul><li>math.h</li></ul>
1765  *
1766  * @see  frexp | modf | scalbln
1767  *
1768  */
1769 float       ldexpf(float, int);
1770 
1771 /**
1772  * @ingroup  math
1773  * @par Description:
1774  * This function returns the result of multiplying the floating-point number x by 2 raised to the power n.
1775  *
1776  * @attention
1777  * <ul>
1778  * <li> None.</li>
1779  * </ul>
1780  *
1781  * @retval "long double"  On success, this function return x * (2^n).\n
1782  * If n is zero, then x is returned.\n
1783  * If x is a NaN, a NaN is returned.\n
1784  * If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.\n
1785  * If the result underflows, a range error occurs, and zero is returned.\n
1786  * If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with a sign the same as x.\n
1787  *
1788  * @par Dependency:
1789  * <ul><li>math.h</li></ul>
1790  *
1791  * @see  frexp | modf | scalbln
1792  *
1793  */
1794 long double ldexpl(long double, int);
1795 
1796 double      lgamma(double);
1797 float       lgammaf(float);
1798 long double lgammal(long double);
1799 
1800 /**
1801  * @ingroup  math
1802  * @par Description:
1803  * The function rounds its argument to the nearest integer value, using the current rounding direction.
1804  * Note that unlike the rint() family of functions, the return type of the function differs from that
1805  * of their arguments.
1806  *
1807  * @attention
1808  * <ul>
1809  * <li> None.</li>
1810  * </ul>
1811  *
1812  * @retval "long long" The function returns the rounded integer value. If x is a NaN or an infinity,
1813  * or the rounded value is too large to be stored in a long
1814  * (long long in the case of the ll * functions), then a domain error occurs,
1815  * and the return value is unspecified.
1816  *
1817  * @par Dependency:
1818  * <ul><li>math.h</li></ul>
1819  *
1820  * @see ceil | floor | lround | nearbyint | rint | round
1821  *
1822  */
1823 long long   llrint(double);
1824 long long   llrintf(float);
1825 long long   llrintl(long double);
1826 
1827 long long   llround(double);
1828 long long   llroundf(float);
1829 long long   llroundl(long double);
1830 
1831 /**
1832  * @ingroup  math
1833  * @par Description:
1834  * This function returns the natural logarithm of x.
1835  *
1836  * @attention
1837  * <ul>
1838  * <li> None.</li>
1839  * </ul>
1840  *
1841  * @retval
1842  * #double  On success, this function returns the natural logarithm of x.\n
1843  * If x is a NaN, a NaN is returned.\n
1844  * If x is 1, the result is +0.\n
1845  * If x is positive infinity, positive infinity is returned.\n
1846  * If x is zero, then a pole error occurs, and the functions return -HUGE_VAL,
1847  * -HUGE_VALF, or -HUGE_VALL, respectively.\n
1848  * If x is negative (including negative infinity), then a domain error occurs,
1849  * and a NaN (not a number) is returned.\n
1850  *
1851  *
1852  * @par Dependency:
1853  * <ul><li>math.h</li></ul>
1854  *
1855  * @see  cbrt | log10 | log1p | log2 | sqrt
1856  *
1857  */
1858 double      log(double);
1859 
1860 /**
1861  * @ingroup  math
1862  * @par Description:
1863  * This function returns the natural logarithm of x.
1864  *
1865  * @attention
1866  * <ul>
1867  * <li>None.</li>
1868  * </ul>
1869  *
1870  * @retval
1871  * #float On success, this function returns the natural logarithm of x.\n
1872  * If x is a NaN, a NaN is returned.\n
1873  * If x is 1, the result is +0.\n
1874  * If x is positive infinity, positive infinity is returned.\n
1875  * If x is zero, then a pole error occurs, and the functions return
1876  * -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.\n
1877  * If x is negative (including negative infinity), then a domain error occurs,
1878  * and a NaN (not a number) is returned.\n
1879  *
1880  * @par Dependency:
1881  * <ul><li>math.h</li></ul>
1882  *
1883  * @see  cbrt | log10 | log1p | log2 | sqrt
1884  *
1885  */
1886 float       logf(float);
1887 
1888 /**
1889  * @ingroup  math
1890  * @par Description:
1891  * This function returns the natural logarithm of x.
1892  *
1893  * @attention
1894  * <ul>
1895  * <li> None.</li>
1896  * </ul>
1897  *
1898  * @retval "long double"  On success, this function returns the natural logarithm of x.\n
1899  * If x is a NaN, a NaN is returned.\n
1900  * If x is 1, the result is +0.\n
1901  * If x is positive infinity, positive infinity is returned.\n
1902  * If x is zero, then a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.\n
1903  * If x is negative (including negative infinity), then a domain error occurs, and a NaN (not a number) is returned.\n
1904  *
1905  * @par Dependency:
1906  * <ul><li>math.h</li></ul>
1907  *
1908  * @see  cbrt | log10 | log1p | log2 | sqrt
1909  *
1910  */
1911 long double logl(long double);
1912 
1913 /**
1914  * @ingroup  math
1915  * @par Description:
1916  * This function returns the base 10 logarithm of x.
1917  *
1918  * @attention
1919  * <ul>
1920  * <li> None.</li>
1921  * </ul>
1922  *
1923  * @retval
1924  * #double  On success, this function returns the base 10 logarithm of x.\n
1925  * For special cases, including where x is 0, 1, negative, infinity, or NaN, see log.\n
1926  *
1927  * @par Dependency:
1928  * <ul><li>math.h</li></ul>
1929  *
1930  * @see  cbrt | log | log2 | sqrt
1931  *
1932  */
1933 double      log10(double);
1934 
1935 /**
1936  * @ingroup  math
1937  * @par Description:
1938  * This function returns the base 10 logarithm of x.
1939  *
1940  * @attention
1941  * <ul>
1942  * <li>None.</li>
1943  * </ul>
1944  *
1945  * @retval
1946  * #float  On success, this function returns the base 10 logarithm of x.\n
1947  * <ul>For special cases, including where x is 0, 1, negative, infinity, or NaN, see log.\n
1948  *
1949  * @par Dependency:
1950  * <ul><li>math.h</li></ul>
1951  *
1952  * @see cbrt | log | log2 | sqrt
1953  *
1954  */
1955 float       log10f(float);
1956 
1957 /**
1958  * @ingroup  math
1959  * @par Description:
1960  * This function returns the base 10 logarithm of x.
1961  *
1962  * @attention
1963  * <ul>
1964  * <li> None.</li>
1965  * </ul>
1966  *
1967  * @retval "long double"  On success, this function returns the base 10 logarithm of x.\n
1968  * <ul>For special cases, including where x is 0, 1, negative, infinity, or NaN, see log.\n
1969  *
1970  * @par Dependency:
1971  * <ul><li>math.h</li></ul>
1972  *
1973  * @see  cbrt | log | log2 | sqrt
1974  *
1975  */
1976 long double log10l(long double);
1977 
1978 /**
1979  * @ingroup  math
1980  * @par Description:
1981  * This function returns a value equivalent to log (1 + x).
1982  *
1983  * @attention
1984  * <ul>
1985  * <li> None.</li>
1986  * </ul>
1987  *
1988  * @retval
1989  * #double  On success, this function returns the natural logarithm of (1 + x).\n
1990  * If x is a NaN, a NaN is returned.\n
1991  * If x is positive infinity, positive infinity is returned.\n
1992  * If x is -1, a pole error occurs, and the functions return -HUGE_VAL,
1993  * -HUGE_VALF, or -HUGE_VALL, respectively.\n
1994  * If x is less than -1 (including negative infinity), a domain error occurs,
1995  * and a NaN (not a number) is returned.\n
1996  *
1997  * @par Dependency:
1998  * <ul><li>math.h</li></ul>
1999  *
2000  * @see  exp | expm1 | log
2001  *
2002  */
2003 double      log1p(double);
2004 
2005 /**
2006  * @ingroup  math
2007  * @par Description:
2008  * The function return a value equivalent to
2009  *           log (1 + x)
2010  * The result is computed in a way that is accurate even if the value of x is near zero.
2011  *
2012  * @attention
2013  * <ul>
2014  * <li>None.</li>
2015  * </ul>
2016  *
2017  * @retval
2018  * #float On success, the function returns the natural logarithm of (1 + x).\n
2019  * If x is a NaN, a NaN is returned.\n
2020  * If x is positive infinity, positive infinity is returned.\n
2021  * If x is -1, a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectivel.\n
2022  * If x is less than -1 (including negative infinity), a domain error occurs, and a NaN (not a number) is returned.\n
2023  *
2024  *
2025  * @par Dependency:
2026  * <ul><li>math.h</li></ul>
2027  *
2028  * @see exp | expm1 | log
2029  *
2030  */
2031 float       log1pf(float);
2032 long double log1pl(long double);
2033 
2034 /**
2035  * @ingroup  math
2036  * @par Description:
2037  * This function returns the base 2 logarithm of x.
2038  *
2039  * @attention
2040  * <ul>
2041  * <li> None.</li>
2042  * </ul>
2043  *
2044  * @retval
2045  * #double On success, the function returns the base 2 logarithm of x.
2046  * For special cases, including where x is 0, 1, negative, infinity, or NaN, see log().
2047  *
2048  * @par Dependency:
2049  * <ul><li>math.h</li></ul>
2050  *
2051  * @see  cbrt | log | log10 | sqrt
2052  *
2053  */
2054 double      log2(double);
2055 
2056 /**
2057  * @ingroup  math
2058  * @par Description:
2059  * This function returns the base 2 logarithm of x.
2060  *
2061  * @attention
2062  * <ul>
2063  * <li>None.</li>
2064  * </ul>
2065  *
2066  * @retval
2067  * #float On success, this function returns the base 2 logarithm of x.\n
2068  * For special cases, including where x is 0, 1, negative, infinity, or NaN, see log.
2069  *
2070  * @par Dependency:
2071  * <ul><li>math.h</li></ul>
2072  *
2073  * @see  cbrt | log | log10 | sqrt
2074  *
2075  */
2076 float       log2f(float);
2077 
2078 /**
2079  * @ingroup  math
2080  * @par Description:
2081  * This function returns the base 2 logarithm of x.
2082  *
2083  * @attention
2084  * <ul>
2085  * <li> None.</li>
2086  * </ul>
2087  *
2088  * @retval "long double" On success, the function returns the base 2 logarithm of x. For special cases, including where x is 0, 1, negative, infinity, or NaN, see log().
2089  *
2090  * @par Dependency:
2091  * <ul><li>math.h</li></ul>
2092  *
2093  * @see  cbrt | log | log10 | sqrt
2094  *
2095  */
2096 long double log2l(long double);
2097 
2098 double      logb(double);
2099 float       logbf(float);
2100 long double logbl(long double);
2101 
2102 long        lrint(double);
2103 long        lrintf(float);
2104 long        lrintl(long double);
2105 
2106 long        lround(double);
2107 long        lroundf(float);
2108 long        lroundl(long double);
2109 
2110 /**
2111  * @ingroup  math
2112  * @par Description:
2113  * This function breaks the argument x into an integral part and a fractional part,
2114  * each of which has the same sign as x.
2115  * The integral part is stored in the location pointed to by iptr.
2116  *
2117  * @attention
2118  * <ul>
2119  * <li> None.</li>
2120  * </ul>
2121  *
2122  * @retval
2123  * #double  This function returns the fractional part of x.\n
2124  * If x is a NaN, a NaN is returned, and *iptr is set to a NaN.\n
2125  * If x is positive infinity (negative infinity), +0 (-0) is returned,
2126  * and *iptr is set to positive infinity (negative infinity).\n
2127  *
2128  * @par Dependency:
2129  * <ul><li>math.h</li></ul>
2130  *
2131  * @see  frexp | ldexp
2132  *
2133  */
2134 double      modf(double, double *);
2135 
2136 /**
2137  * @ingroup  math
2138  * @par Description:
2139  * This function breaks the argument x into an integral part and a fractional part,
2140  * each of which has the same sign as x.
2141  * The integral part is stored in the location pointed to by iptr.
2142  *
2143  * @attention
2144  * <ul>
2145  * <li> None.</li>
2146  * </ul>
2147  *
2148  * @retval
2149  * #float This function returns the fractional part of x.\n
2150  * If x is a NaN, a NaN is returned, and *iptr is set to a NaN.\n
2151  * If x is positive infinity (negative infinity), +0 (-0) is returned, and *iptr
2152  * is set to positive infinity (negative infinity).\n
2153  *
2154  * @par Dependency:
2155  * <ul><li>math.h</li></ul>
2156  *
2157  * @see  frexp | ldexp
2158  *
2159  */
2160 float       modff(float, float *);
2161 
2162 /**
2163  * @ingroup  math
2164  * @par Description:
2165  * This function breaks the argument x into an integral part and a fractional part, each of which has the same sign as x.
2166  * The integral part is stored in the location pointed to by iptr.
2167  *
2168  * @attention
2169  * <ul>
2170  * <li> None.</li>
2171  * </ul>
2172  *
2173  * @retval "long double"  This function returns the fractional part of x.\n
2174  * If x is a NaN, a NaN is returned, and *iptr is set to a NaN.\n
2175  * If x is positive infinity (negative infinity), +0 (-0) is returned, and *iptr is set to positive infinity (negative infinity).\n
2176  *
2177  * @par Dependency:
2178  * <ul><li>math.h</li></ul>
2179  *
2180  * @see  frexp | ldexp
2181  *
2182  */
2183 long double modfl(long double, long double *);
2184 
2185 /**
2186  * @ingroup  math
2187  * @par Description:
2188  * The function returns a representation (determined by __kind) of a quiet NaN. If the implementation does not support
2189  * quiet NaNs, the function returns zero.
2190  *
2191  * @attention
2192  * <ul>
2193  * <li> None.</li>
2194  * </ul>
2195  *
2196  * @retval
2197  * #double It returns a representation (determined by __kind) of a quiet NaN. If the implementation does not support
2198  * quiet NaNs, the function returns zero.
2199  *
2200  * @par Dependency:
2201  * <ul><li>math.h</li></ul>
2202  *
2203  * @see  signbit
2204  *
2205  */
2206 double      nan(const char *);
2207 
2208 /**
2209  * @ingroup  math
2210  * @par Description:
2211  * The function returns a representation (determined by __kind) of a quiet NaN. If the implementation does not support
2212  * quiet NaNs, the function returns zero.
2213  *
2214  * @attention
2215  * <ul>
2216  * <li> None.</li>
2217  * </ul>
2218  *
2219  * @retval
2220  * #float It returns a representation (determined by __kind) of a quiet NaN. If the implementation does not support
2221  * quiet NaNs, the function returns zero.
2222  *
2223  * @par Dependency:
2224  * <ul><li>math.h</li></ul>
2225  *
2226  * @see  signbit
2227  *
2228  */
2229 float       nanf(const char *);
2230 
2231 /**
2232  * @ingroup  math
2233  * @par Description:
2234  * The function returns a representation (determined by __kind) of a quiet NaN. If the implementation does not support
2235  * quiet NaNs, the function returns zero.
2236  *
2237  * @attention
2238  * <ul>
2239  * <li> None.</li>
2240  * </ul>
2241  *
2242  * @retval "long double" It returns a representation (determined by __kind) of a quiet NaN. If the implementation does not support
2243  * quiet NaNs, the function returns zero.
2244  *
2245  * @par Dependency:
2246  * <ul><li>math.h</li></ul>
2247  *
2248  * @see  signbit
2249  *
2250  */
2251 long double nanl(const char *);
2252 
2253 double      nearbyint(double);
2254 float       nearbyintf(float);
2255 long double nearbyintl(long double);
2256 
2257 /**
2258  * @ingroup  math
2259  * @par Description:
2260  * The nextafter() functions return the next representable floating-point value following x in
2261  * the direction of y. If y is less than x, these functions will return the largest representable
2262  * number less than x. If x equals y, the functions return y.
2263  *
2264  * @attention
2265  * <ul>
2266  * <li> None.</li>
2267  * </ul>
2268  *
2269  * @retval
2270  * #double On success, these functions return the next representable floating-point value after x
2271  * in the direction of y.\n
2272  * If x equals y, then y (cast to the same type as x) is returned.\n
2273  * If x or y is a NaN, a NaN is returned.\n
2274  * If x is finite, and the result would overflow, a range error occurs, and the functions return
2275  * HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the
2276  * correct mathematical sign.\n
2277  * If x is not equal to y, and the correct function result would be subnormal, zero, or underflow,
2278  * a range error occurs, and either the correct value (if it
2279  * can be represented), or 0.0, is returned.\n
2280  *
2281  * @par Dependency:
2282  * <ul><li>math.h</li></ul>
2283  *
2284  * @see nearbyint
2285  *
2286  */
2287 double      nextafter(double, double);
2288 
2289 /**
2290  * @ingroup  math
2291  * @par Description:
2292  * The nextafterf() function returns the next representable floating-point value
2293  * following  x in the direction of y. If y is less than x, the function will return
2294  * the largest representable number less than x. If x equals y, the functions return y.
2295  *
2296  * @attention
2297  * <ul>
2298  * <li>None.</li>
2299  * </ul>
2300  *
2301  * @retval
2302  * #float On success, the function returns the next representable floating-point value after x
2303  * in the direction of y.\n
2304  * If x equals y, then y (cast to the same type as x) is returned.\n
2305  * If x or y is a NaN, a NaN is returned.\n
2306  * If x is finite, and the result would overflow, a range error occurs,
2307  * and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the correct mathematical sign.\n
2308  * If  x  is  not equal to y, and the correct function result would be subnormal, zero, or underflow,
2309  * a range error occurs, and either the correct value (if it can be represented), or 0.0, is returned.\n
2310  *
2311  * @par Dependency:
2312  * <ul><li>math.h</li></ul>
2313  * @see  nearbyint
2314  *
2315  */
2316 float       nextafterf(float, float);
2317 long double nextafterl(long double, long double);
2318 
2319 double      nexttoward(double, long double);
2320 float       nexttowardf(float, long double);
2321 long double nexttowardl(long double, long double);
2322 
2323 /**
2324  * @ingroup  math
2325  * @par Description:
2326  * The pow() function returns the value of x raised to the power of y.
2327  *
2328  * @attention
2329  * <ul>
2330  * <li> None.</li>
2331  * </ul>
2332  *
2333  * @retval
2334  * #double  On success, this function returns the value of x to the power of y.\n
2335  * If x is a finite value less than 0, and y is a finite noninteger, a domain error occurs,
2336  * and a NaN is returned.\n
2337  * If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF,
2338  * or HUGE_VALL, respectively, with the mathematically correct
2339  * sign.\n
2340  * If result underflows, and is not representable, a range error occurs, and 0.0 is returned.\n
2341  * Except as specified below, if x or y is a NaN, the result is a NaN.\n
2342  * If x is +1, the result is 1.0 (even if y is a NaN).\n
2343  * If y is 0, the result is 1.0 (even if x is a NaN).\n
2344  * If x is +0 (-0), and y is an odd integer greater than 0, the result is +0 (-0).\n
2345  * If x is 0, and y greater than 0 and not an odd integer, the result is +0.\n
2346  * If x is -1, and y is positive infinity or negative infinity, the result is 1.0.\n
2347  * If the absolute value of x is less than 1, and y is negative infinity, the result is positive infinity.\n
2348  * If the absolute value of x is greater than 1, and y is negative infinity, the result is +0.\n
2349  * If the absolute value of x is less than 1, and y is positive infinity, the result is +0.\n
2350  * If the absolute value of x is greater than 1, and y is positive infinity, the result is positive infinity.\n
2351  * If x is negative infinity, and y is an odd integer less than 0, the result is -0.\n
2352  * If x is negative infinity, and y less than 0 and not an odd integer, the result is +0.\n
2353  * If x is negative infinity, and y is an odd integer greater than 0, the result is negative infinity.\n
2354  * If x is negative infinity, and y greater than 0 and not an odd integer, the result is positive infinity.\n
2355  * If x is positive infinity, and y less than 0, the result is +0.\n
2356  * If x is positive infinity, and y greater than 0, the result is positive infinity.\n
2357  * If x is +0 or -0, and y is an odd integer less than 0, a pole error occurs and HUGE_VAL, HUGE_VALF,
2358  * or HUGE_VALL, is returned, with the same sign as x.\n
2359  * If x is +0 or -0, and y is less than 0 and not an odd integer, a pole error occurs and +HUGE_VAL,
2360  * +HUGE_VALF, or +HUGE_VALL, is returned.\n
2361  *
2362  * @par Dependency:
2363  * <ul><li>math.h</li></ul>
2364  *
2365  * @see  cbrt | sqrt
2366  *
2367  */
2368 double      pow(double, double);
2369 
2370 /**
2371  * @ingroup  math
2372  * @par Description:
2373  * This function returns the value of x raised to the power of y.
2374  *
2375  * @attention
2376  * <ul>
2377  * <li>None.</li>
2378  * </ul>
2379  *
2380  * @retval
2381  * #float On success, this function returns the value of x to the power of y.\n
2382  * If x is a finite value less than 0, and y is a finite noninteger, a domain error occurs, and a NaN is returned.\n
2383  * If the result overflows, a range error occurs, and the functions return
2384  * HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the mathematically correct sign.\n
2385  * If result underflows, and is not representable, a range error occurs, and 0.0 is returned.\n
2386  * Except as specified below, if x or y is a NaN, the result is a NaN.\n
2387  * If x is +1, the result is 1.0 (even if y is a NaN).\n
2388  * If y is 0, the result is 1.0 (even if x is a NaN).\n
2389  * If x is +0 (-0), and y is an odd integer greater than 0, the result is +0 (-0).\n
2390  * If x is 0, and y greater than 0 and not an odd integer, the result is +0.\n
2391  * If x is -1, and y is positive infinity or negative infinity, the result is 1.0.\n
2392  * If the absolute value of x is less than 1, and y is negative infinity, the result is positive infinity.\n
2393  * If the absolute value of x is greater than 1, and y is negative infinity, the result is +0.\n
2394  * If the absolute value of x is less than 1, and y is positive infinity, the result is +0.\n
2395  * If the absolute value of x is greater than 1, and y is positive infinity, the result is positive infinity.\n
2396  * If x is negative infinity, and y is an odd integer less than 0, the result is -0.\n
2397  * If x is negative infinity, and y less than 0 and not an odd integer, the result is +0.\n
2398  * If x is negative infinity, and y is an odd integer greater than 0, the result is negative infinity.\n
2399  * If x is negative infinity, and y greater than 0 and not an odd integer, the result is positive infinity.\n
2400  * If x is positive infinity, and y less than 0, the result is +0.\n
2401  * If x is positive infinity, and y greater than 0, the result is positive infinity.\n
2402  * If x is +0 or -0, and y is an odd integer less than 0, a pole error occurs and
2403  * HUGE_VAL, HUGE_VALF, or HUGE_VALL, is returned, with the same sign as x.\n
2404  * If x is +0 or -0, and y is less than 0 and not an odd integer, a pole error occurs
2405  * and +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL, is returned.\n
2406  *
2407  * @par Dependency:
2408  * <ul><li>math.h</li></ul>
2409  *
2410  * @see cbrt | sqrt
2411  *
2412  */
2413 float       powf(float, float);
2414 
2415 /**
2416  * @ingroup  math
2417  * @par Description:
2418  * The powl() function returns the value of x raised to the power of y.
2419  *
2420  * @attention
2421  * <ul>
2422  * <li> None.</li>
2423  * </ul>
2424  *
2425  * @retval "long double"  On success, this function returns the value of x to the power of y.\n
2426  * If x is a finite value less than 0, and y is a finite noninteger, a domain error occurs, and a NaN is returned.\n
2427  * If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the mathematically correct
2428  * sign.\n
2429  * If result underflows, and is not representable, a range error occurs, and 0.0 is returned.\n
2430  * Except as specified below, if x or y is a NaN, the result is a NaN.\n
2431  * If x is +1, the result is 1.0 (even if y is a NaN).\n
2432  * If y is 0, the result is 1.0 (even if x is a NaN).\n
2433  * If x is +0 (-0), and y is an odd integer greater than 0, the result is +0 (-0).\n
2434  * If x is 0, and y greater than 0 and not an odd integer, the result is +0.\n
2435  * If x is -1, and y is positive infinity or negative infinity, the result is 1.0.\n
2436  * If the absolute value of x is less than 1, and y is negative infinity, the result is positive infinity.\n
2437  * If the absolute value of x is greater than 1, and y is negative infinity, the result is +0.\n
2438  * If the absolute value of x is less than 1, and y is positive infinity, the result is +0.\n
2439  * If the absolute value of x is greater than 1, and y is positive infinity, the result is positive infinity.\n
2440  * If x is negative infinity, and y is an odd integer less than 0, the result is -0.\n
2441  * If x is negative infinity, and y less than 0 and not an odd integer, the result is +0.\n
2442  * If x is negative infinity, and y is an odd integer greater than 0, the result is negative infinity.\n
2443  * If x is negative infinity, and y greater than 0 and not an odd integer, the result is positive infinity.\n
2444  * If x is positive infinity, and y less than 0, the result is +0.\n
2445  * If x is positive infinity, and y greater than 0, the result is positive infinity.\n
2446  * If x is +0 or -0, and y is an odd integer less than 0, a pole error occurs and HUGE_VAL, HUGE_VALF, or HUGE_VALL, is returned, with the same sign as x.\n
2447  * If x is +0 or -0, and y is less than 0 and not an odd integer, a pole error occurs and +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL, is returned.\n
2448  *
2449  * @par Dependency:
2450  * <ul><li>math.h</li></ul>
2451  *
2452  * @see  cbrt | sqrt
2453  *
2454  */
2455 long double powl(long double, long double);
2456 
2457 double      remainder(double, double);
2458 float       remainderf(float, float);
2459 long double remainderl(long double, long double);
2460 
2461 double      remquo(double, double, int *);
2462 float       remquof(float, float, int *);
2463 long double remquol(long double, long double, int *);
2464 
2465 /**
2466  * @ingroup  math
2467  * @par Description:
2468  * The rint() function rounds itsargument to an integer value in floating-point format,
2469  * using the current rounding direction and
2470  * will raise the inexact exception when the result differs in value from the argument.
2471  *
2472  * @attention
2473  * <ul>
2474  * <li> None.</li>
2475  * </ul>
2476  *
2477  * @retval
2478  * #double The function returns the rounded integer value. If x is integral, +0, -0, NaN, or
2479  * infinite, x itself is returned.
2480  *
2481  * @par Dependency:
2482  * <ul><li>math.h</li></ul>
2483  *
2484  * @see ceil | floor | lrint | round | trunc
2485  *
2486  */
2487 double      rint(double);
2488 
2489 /**
2490  * @ingroup  math
2491  * @par Description:
2492  * The rintf() function rounds itsargument to an integer value in floating-point format,
2493  * using the current rounding direction and
2494  * will raise the inexact exception when the result differs in value from the argument.
2495  *
2496  * @attention
2497  * <ul>
2498  * <li>None.</li>
2499  * </ul>
2500  *
2501  * @retval
2502  * #float The function returns the rounded integer value. If x is integral, +0, -0,
2503  * NaN, or infinite, x itself is returned.
2504  *
2505  * @par Dependency:
2506  * <ul><li>math.h</li></ul>
2507  *
2508  * @see ceil | floor | lrint | round | trunc
2509  *
2510  */
2511 float       rintf(float);
2512 
2513 /**
2514  * @ingroup  math
2515  * @par Description:
2516  * The rintl() function rounds itsargument to an integer value in floating-point format, using the current rounding direction and
2517  * will raise the inexact exception when the result differs in value from the argument.
2518  *
2519  * @attention
2520  * <ul>
2521  * <li> None.</li>
2522  * </ul>
2523  *
2524  * @retval "long double" The function returns the rounded integer value. If x is integral, +0, -0, NaN, or infinite, x itself is returned.
2525  *
2526  * @par Dependency:
2527  * <ul><li>math.h</li></ul>
2528  *
2529  * @see ceil | floor | lrint | round | trunc
2530  *
2531  */
2532 long double rintl(long double);
2533 
2534 /**
2535  * @ingroup  math
2536  * @par Description:
2537  * The function rounds x to the nearest integer, but round halfway cases away from zero,
2538  * instead of to the nearest even integer
2539  * like rint(). For example, round(0.5) is 1.0, and round(-0.5) is -1.0.
2540  *
2541  * @attention
2542  * <ul>
2543  * <li>None.</li>
2544  * </ul>
2545  *
2546  * @retval
2547  * #double This function returns the rounded integer value.\n
2548  * If x is integral, +0, -0, NaN, or infinite, x itself is returned.\n
2549  *
2550  * @par Dependency:
2551  * <ul><li>math.h</li></ul>
2552  *
2553  * @see  ceil | floor | lround | nearbyint | rint | trunc
2554  *
2555  */
2556 double      round(double);
2557 
2558 /**
2559  * @ingroup  math
2560  * @par Description:
2561  * The function rounds x to the nearest integer, but round halfway cases away from zero,
2562  * instead of to the nearest even integer
2563  * like rint().
2564  *
2565  * @attention
2566  * <ul>
2567  * <li>None.</li>
2568  * </ul>
2569  *
2570  * @retval
2571  * #float This function returns the rounded integer value.\n
2572  * If x is integral, +0, -0, NaN, or infinite, x itself is returned.\n
2573  *
2574  * @par Dependency:
2575  * <ul><li>math.h</li></ul>
2576  *
2577  * @see  ceil | floor | lround | nearbyint | rint | trunc
2578  *
2579  */
2580 float       roundf(float);
2581 
2582 /**
2583  * @ingroup  math
2584  * @par Description:
2585  * The function rounds x to the nearest integer, but round halfway cases away from zero, instead of to the nearest even integer
2586  * like rint().
2587  *
2588  * @attention
2589  * <ul>
2590  * <li>None.</li>
2591  * </ul>
2592  *
2593  * @retval "long double" This function returns the rounded integer value.\n
2594  * If x is integral, +0, -0, NaN, or infinite, x itself is returned.\n
2595  *
2596  * @par Dependency:
2597  * <ul><li>math.h</li></ul>
2598  *
2599  * @see  ceil | floor | lround | nearbyint | rint | trunc
2600  *
2601  */
2602 long double roundl(long double);
2603 
2604 double      scalbln(double, long);
2605 float       scalblnf(float, long);
2606 long double scalblnl(long double, long);
2607 
2608 double      scalbn(double, int);
2609 
2610 /**
2611  * @ingroup  math
2612  * @par Description:
2613  * The function multiplies its first argument x by FLT_RADIX (probably 2) to the power of n, that is:
2614  *     x * FLT_RADIX * * exp
2615  *The definition of FLT_RADIX can be obtained by including <float.h>
2616  *
2617  * @attention
2618  * <ul>
2619  * <li> None.</li>
2620  * </ul>
2621  *
2622  * @retval
2623  * #float On success, the function returns x * FLT_RADIX * * exp.
2624  * <ul>If x is a NaN, a NaN is returned.</ul>
2625  * <ul>If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.</ul>
2626  * <ul>If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF,
2627  *     or HUGE_VALL, respectively, with a sign the same as x.</ul>
2628  * <ul>If x is less than -1 (including negative infinity), a domain error occurs,
2629  *     and a NaN (not a number) is returned.</ul>
2630  * <ul>If the result underflows, a range error occurs, and the functions return zero,
2631  *     with a sign the same as x.</ul>
2632  *
2633  * @par Dependency:
2634  * <ul><li>math.h</li></ul>
2635  *
2636  * @see ldexp
2637  *
2638  */
2639 float       scalbnf(float, int);
2640 
2641 /**
2642  * @ingroup  math
2643  * @par Description:
2644  * The function multiplies its first argument x by FLT_RADIX (probably 2) to the power of n, that is:
2645  *     x * FLT_RADIX ** exp
2646  * The definition of FLT_RADIX can be obtained by including <float.h>
2647  *
2648  * @attention
2649  * <ul>
2650  * <li> None.</li>
2651  * </ul>
2652  *
2653  * @retval "long double" On success, the function returns x * FLT_RADIX ** exp.
2654  * <ul>If x is a NaN, a NaN is returned.</ul>
2655  * <ul>If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.</ul>
2656  * <ul>If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF,
2657  *     or HUGE_VALL, respectively, with a sign the same as x.</ul>
2658  * <ul>If x is less than -1 (including negative infinity), a domain error occurs,
2659  *     and a NaN (not a number) is returned.</ul>
2660  * <ul>If the result underflows, a range error occurs, and the functions return zero,
2661  *     with a sign the same as x.</ul>
2662  *
2663  * @par Dependency:
2664  * <ul><li>math.h</li></ul>
2665  *
2666  * @see ldexp
2667  *
2668  */
2669 long double scalbnl(long double, int);
2670 /**
2671  * @ingroup  math
2672  * @par Description:
2673  * This function returns the sine of x, where x is given in radians.
2674  *
2675  * @attention
2676  * <ul>
2677  * <li> None.</li>
2678  * </ul>
2679  *
2680  * @retval
2681  * #double  On success, this function returns the sine of x.\n
2682  * If x is a NaN, a NaN is returned.\n
2683  * If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned.\n
2684  *
2685  * @par Dependency:
2686  * <ul><li>math.h</li></ul>
2687  *
2688  * @see  acos | asin | atan | atan2 | sincos | tan | cos
2689  *
2690  */
2691 double      sin(double);
2692 
2693 /**
2694  * @ingroup  math
2695  * @par Description:
2696  * This function returns the sine of x, where x is given in radians.
2697  *
2698  * @attention
2699  * <ul>
2700  * <li> None.</li>
2701  * </ul>
2702  *
2703  * @retval
2704  * #float  On success, this function returns the sine of x.\n
2705  * If x is a NaN, a NaN is returned.\n
2706  * If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned.\n
2707  *
2708  * @par Dependency:
2709  * <ul><li>math.h</li></ul>
2710  *
2711  * @see  acos | asin | atan | atan2 | sin | sincos | tan
2712  *
2713  */
2714 float       sinf(float);
2715 
2716 /**
2717  * @ingroup  math
2718  * @par Description:
2719  * This function returns the sine of x, where x is given in radians.
2720  *
2721  * @attention
2722  * <ul>
2723  * <li> None.</li>
2724  * </ul>
2725  *
2726  * @retval "long double"  On success, this function returns the sine of x.\n
2727  * If x is a NaN, a NaN is returned.\n
2728  * If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned.\n
2729  *
2730  * @par Dependency:
2731  * <ul><li>math.h</li></ul>
2732  *
2733  * @see  acos | asin | atan | atan2 | sincos | tan | cos
2734  *
2735  */
2736 long double sinl(long double);
2737 
2738 /**
2739  * @ingroup  math
2740  * @par Description:
2741  * This function returns the hyperbolic sine of x, which is defined mathematically as:
2742  * sinh(x) = (exp(x) - exp(-x)) / 2
2743  *
2744  * @attention
2745  * <ul>
2746  * <li> None.</li>
2747  * </ul>
2748  *
2749  * @retval
2750  * #double  On success, this function return the hyperbolic sine of x.\n
2751  * If x is a NaN, a NaN is returned.\n
2752  * If x is  +0 (-0), +0 (-0) is returned.\n
2753  * If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.\n
2754  * If the result overflows, a range error occurs, and the functions return +HUGE_VAL,
2755  * +HUGE_VALF, or +HUGE_VALL, respectively.\n
2756  *
2757  * @par Dependency:
2758  * <ul><li>math.h</li></ul>
2759  *
2760  * @see  acosh | asinh | atanh | cosh | tanh
2761  *
2762  */
2763 double      sinh(double);
2764 
2765 /**
2766  * @ingroup  math
2767  * @par Description:
2768  * This function returns the hyperbolic sine of x, which is defined mathematically as:
2769  * sinh(x) = (exp(x) - exp(-x)) / 2
2770  *
2771  * @attention
2772  * <ul>
2773  * <li> None.</li>
2774  * </ul>
2775  *
2776  * @retval
2777  * #float  On success, this function return the hyperbolic sine of x.\n
2778  * If x is a NaN, a NaN is returned.\n
2779  * If x is  +0 (-0), +0 (-0) is returned.\n
2780  * If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.\n
2781  * If the result overflows, a range error occurs, and the functions return +HUGE_VAL,
2782  * +HUGE_VALF, or +HUGE_VALL, respectively.\n
2783  *
2784  * @par Dependency:
2785  * <ul><li>math.h</li></ul>
2786  *
2787  * @see  acosh | asinh | atanh | cosh | tanh
2788  *
2789  */
2790 float       sinhf(float);
2791 
2792 /**
2793  * @ingroup  math
2794  * @par Description:
2795  * This function returns the hyperbolic sine of x.
2796  *
2797  * @attention
2798  * <ul>
2799  * <li> None.</li>
2800  * </ul>
2801  *
2802  * @retval "long double"  On success, this function return the hyperbolic sine of x.\n
2803  * If x is a NaN, a NaN is returned.\n
2804  * If x is  +0 (-0), +0 (-0) is returned.\n
2805  * If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.\n
2806  * If the result overflows, a range error occurs, and the functions return +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL, respectively.\n
2807  *
2808  * @par Dependency:
2809  * <ul><li>math.h</li></ul>
2810  *
2811  * @see  acosh | asinh | atanh | cosh | tanh
2812  *
2813  */
2814 long double sinhl(long double);
2815 
2816 /**
2817  * @ingroup  math
2818  * @par Description:
2819  * The sqrt() function returns the nonnegative square root of x.
2820  *
2821  * @attention
2822  * <ul>
2823  * <li> None.</li>
2824  * </ul>
2825  *
2826  * @retval
2827  * #double  On success, this function returns the square root of x.\n
2828  * If x is a NaN, a NaN is returned.\n
2829  * If x is +0 (-0), +0 (-0) is returned.\n
2830  * If x is positive infinity, positive infinity is returned.\n
2831  * If x is less than -0, a domain error occurs, and a NaN is returned.\n
2832  *
2833  * @par Dependency:
2834  * <ul><li>math.h</li></ul>
2835  *
2836  * @see  cbrt | hypot
2837  *
2838  */
2839 double      sqrt(double);
2840 
2841 /**
2842  * @ingroup  math
2843  * @par Description:
2844  * This function returns the nonnegative square root of x.
2845  *
2846  * @attention
2847  * <ul>
2848  * <li>None.</li>
2849  * </ul>
2850  *
2851  * @retval
2852  * #float  On success, this function returns the square root of x.\n
2853  * If x is a NaN, a NaN is returned.\n
2854  * If x is +0 (-0), +0 (-0) is returned.\n
2855  * If x is positive infinity, positive infinity is returned.\n
2856  * If x is less than -0, a domain error occurs, and a NaN is returned.\n
2857  *
2858  * @par Dependency:
2859  * <ul><li>math.h</li></ul>
2860  *
2861  * @see cbrt | hypot
2862  *
2863  */
2864 float       sqrtf(float);
2865 
2866 /**
2867  * @ingroup  math
2868  * @par Description:
2869  * The sqrtl() function returns the nonnegative square root of x.
2870  *
2871  * @attention
2872  * <ul>
2873  * <li> None.</li>
2874  * </ul>
2875  *
2876  * @retval "long double"  On success, this function returns the square root of x.\n
2877  * If x is a NaN, a NaN is returned.\n
2878  * If x is +0 (-0), +0 (-0) is returned.\n
2879  * If x is positive infinity, positive infinity is returned.\n
2880  * If x is less than -0, a domain error occurs, and a NaN is returned.\n
2881  *
2882  * @par Dependency:
2883  * <ul><li>math.h</li></ul>
2884  *
2885  * @see  cbrt | hypot
2886  *
2887  */
2888 long double sqrtl(long double);
2889 
2890 /**
2891  * @ingroup  math
2892  * @par Description:
2893  * This function returns the tangent of x, where x is given in radians.
2894  *
2895  * @attention
2896  * <ul>
2897  * <li> None.</li>
2898  * </ul>
2899  *
2900  * @retval
2901  * #double  On success, this function returns the tangent of x.\n
2902  * If x is a NaN, a NaN is returned.\n
2903  * If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned.\n
2904  * If the correct result would overflow, a range error occurs, and the functions
2905  * return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the
2906  * mathematically correct sign.\n
2907  *
2908  * @par Dependency:
2909  * <ul><li>math.h</li></ul>
2910  *
2911  * @see  acos | asin | atan | atan2 | cos | sin
2912  *
2913  */
2914 double      tan(double);
2915 
2916 /**
2917  * @ingroup  math
2918  * @par Description:
2919  * This function returns the tangent of x, where x is given in radians.
2920  *
2921  * @attention
2922  * <ul>
2923  * <li> None.</li>
2924  * </ul>
2925  *
2926  * @retval
2927  * #float  On success, this function returns the tangent of x.\n
2928  * If x is a NaN, a NaN is returned.\n
2929  * If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned.\n
2930  * If the correct result would overflow, a range error occurs, and the functions return
2931  * HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the
2932  * mathematically correct sign.\n
2933  *
2934  * @par Dependency:
2935  * <ul><li>math.h</li></ul>
2936  *
2937  * @see  acos | asin | atan | atan2 | cos | sin
2938  *
2939  */
2940 float       tanf(float);
2941 
2942 /**
2943  * @ingroup  math
2944  * @par Description:
2945  * This function returns the tangent of x, where x is given in radians.
2946  *
2947  * @attention
2948  * <ul>
2949  * <li> None.</li>
2950  * </ul>
2951  *
2952  * @retval "long double"  On success, this function returns the tangent of x.\n
2953  * If x is a NaN, a NaN is returned.\n
2954  * If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned.\n
2955  * If the correct result would overflow, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the
2956  * mathematically correct sign.\n
2957  *
2958  * @par Dependency:
2959  * <ul><li>math.h</li></ul>
2960  *
2961  * @see  acos | asin | atan | atan2 | cos | sin
2962  *
2963  */
2964 long double tanl(long double);
2965 
2966 /**
2967  * @ingroup  math
2968  * @par Description:
2969  * This function returns the hyperbolic tangent of x, which is defined mathematically as:
2970  * tanh(x) = sinh(x) / cosh(x)
2971  *
2972  * @attention
2973  * <ul>
2974  * <li> None.</li>
2975  * </ul>
2976  *
2977  * @retval
2978  * #double On success, this function returns the hyperbolic tangent of x.\n
2979  * If x is a NaN, a NaN is returned.\n
2980  * If x is  +0 (-0), +0 (-0) is returned.\n
2981  * If x is positive infinity (negative infinity), +1 (-1) is returned.\n
2982  *
2983  * @par Dependency:
2984  * <ul><li>math.h</li></ul>
2985  *
2986  * @see acosh | asinh | atanh | cosh | sinh
2987  *
2988  */
2989 double      tanh(double);
2990 
2991 /**
2992  * @ingroup  math
2993  * @par Description:
2994  * This function returns the hyperbolic tangent of x, which is defined mathematically as:
2995  * tanh(x) = sinh(x) / cosh(x)
2996  *
2997  * @attention
2998  * <ul>
2999  * <li> None.</li>
3000  * </ul>
3001  *
3002  * @retval
3003  * #float  On success, this function returns the hyperbolic tangent of x.\n
3004  * If x is a NaN, a NaN is returned.\n
3005  * If x is  +0 (-0), +0 (-0) is returned.\n
3006  * If x is positive infinity (negative infinity), +1 (-1) is returned.\n
3007  *
3008  * @par Dependency:
3009  * <ul><li>math.h</li></ul>
3010  *
3011  * @see  acosh | asinh | atanh | cosh | sinh
3012  *
3013  */
3014 float       tanhf(float);
3015 
3016 /**
3017  * @ingroup  math
3018  * @par Description:
3019  * This function returns the hyperbolic tangent of x, which is defined mathematically as:
3020  * tanh(x) = sinh(x) / cosh(x)
3021  *
3022  * @attention
3023  * <ul>
3024  * <li> None.</li>
3025  * </ul>
3026  *
3027  * @retval "long double" On success, this function returns the hyperbolic tangent of x.\n
3028  * If x is a NaN, a NaN is returned.\n
3029  * If x is  +0 (-0), +0 (-0) is returned.\n
3030  * If x is positive infinity (negative infinity), +1 (-1) is returned.\n
3031  *
3032  * @par Dependency:
3033  * <ul><li>math.h</li></ul>
3034  *
3035  * @see acosh | asinh | atanh | cosh | sinh
3036  *
3037  */
3038 long double tanhl(long double);
3039 
3040 double      tgamma(double);
3041 float       tgammaf(float);
3042 long double tgammal(long double);
3043 
3044 /**
3045  * @ingroup  math
3046  * @par Description:
3047  * The function rounds x to the nearest integer not larger in absolute value.
3048  *
3049  * @attention
3050  * <ul>
3051  * <li>None.</li>
3052  * </ul>
3053  *
3054  * @retval
3055  * #double This function returns the rounded integer value.\n
3056  * If x is integral, infinite, or NaN, x itself is returned.\n
3057  *
3058  * @par Dependency:
3059  * <ul><li>math.h</li></ul>
3060  *
3061  * @see ceil | floor | lrint | nearbyint | rint | round
3062  *
3063  */
3064 double      trunc(double);
3065 
3066 /**
3067  * @ingroup  math
3068  * @par Description:
3069  * The truncf() function round x to the nearest integer not larger in absolute value.
3070  *
3071  * @attention
3072  * <ul>
3073  * <li>None.</li>
3074  * </ul>
3075  *
3076  * @retval
3077  * #float The function returns the rounded integer value. If x is integral, infinite, or NaN, x itself is returned.
3078  *
3079  * @par Dependency:
3080  * <ul><li>math.h</li></ul>
3081  *
3082  * @see ceil | floor | lrint | nearbyint | rint | round
3083  *
3084  */
3085 float       truncf(float);
3086 
3087 /**
3088  * @ingroup  math
3089  * @par Description:
3090  * The function rounds x to the nearest integer not larger in absolute value.
3091  *
3092  * @attention
3093  * <ul>
3094  * <li>None.</li>
3095  * </ul>
3096  *
3097  * @retval "long double" This function returns the rounded integer value.\n
3098  * If x is integral, infinite, or NaN, x itself is returned.\n
3099  *
3100  * @par Dependency:
3101  * <ul><li>math.h</li></ul>
3102  *
3103  * @see ceil | floor | lrint | nearbyint | rint | round
3104  *
3105  */
3106 long double truncl(long double);
3107 
3108 
3109 #if defined(_XOPEN_SOURCE) || defined(_BSD_SOURCE)
3110 #undef  MAXFLOAT
3111 #define MAXFLOAT        3.40282346638528859812e+38F
3112 #endif
3113 
3114 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3115 #define M_E             2.7182818284590452354   /* e */
3116 #define M_LOG2E         1.4426950408889634074   /* log_2 e */
3117 #define M_LOG10E        0.43429448190325182765  /* log_10 e */
3118 #define M_LN2           0.69314718055994530942  /* log_e 2 */
3119 #define M_LN10          2.30258509299404568402  /* log_e 10 */
3120 #define M_PI            3.14159265358979323846  /* pi */
3121 #define M_PI_2          1.57079632679489661923  /* pi/2 */
3122 #define M_PI_4          0.78539816339744830962  /* pi/4 */
3123 #define M_1_PI          0.31830988618379067154  /* 1/pi */
3124 #define M_2_PI          0.63661977236758134308  /* 2/pi */
3125 #define M_2_SQRTPI      1.12837916709551257390  /* 2/sqrt(pi) */
3126 #define M_SQRT2         1.41421356237309504880  /* sqrt(2) */
3127 #define M_SQRT1_2       0.70710678118654752440  /* 1/sqrt(2) */
3128 
3129 extern int signgam;
3130 
3131 double      j0(double);
3132 double      j1(double);
3133 double      jn(int, double);
3134 
3135 double      y0(double);
3136 double      y1(double);
3137 double      yn(int, double);
3138 #endif
3139 
3140 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3141 #define HUGE            3.40282346638528859812e+38F
3142 
3143 double      drem(double, double);
3144 float       dremf(float, float);
3145 
3146 int         finite(double);
3147 int         finitef(float);
3148 
3149 double      scalb(double, double);
3150 float       scalbf(float, float);
3151 
3152 double      significand(double);
3153 float       significandf(float);
3154 
3155 double      lgamma_r(double, int*);
3156 float       lgammaf_r(float, int*);
3157 
3158 float       j0f(float);
3159 float       j1f(float);
3160 float       jnf(int, float);
3161 
3162 float       y0f(float);
3163 float       y1f(float);
3164 float       ynf(int, float);
3165 #endif
3166 
3167 #ifdef _GNU_SOURCE
3168 long double lgammal_r(long double, int*);
3169 
3170 void        sincos(double, double*, double*);
3171 void        sincosf(float, float*, float*);
3172 void        sincosl(long double, long double*, long double*);
3173 
3174 double      exp10(double);
3175 float       exp10f(float);
3176 long double exp10l(long double);
3177 
3178 double      pow10(double);
3179 float       pow10f(float);
3180 long double pow10l(long double);
3181 #endif
3182 
3183 #ifdef __cplusplus
3184 }
3185 #endif
3186 
3187 #endif
3188