TizenRT Libs&Environment  v2.0 M2
math.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * Copyright 2016-2017 Samsung Electronics All Rights Reserved.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing,
12  * software distributed under the License is distributed on an
13  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14  * either express or implied. See the License for the specific
15  * language governing permissions and limitations under the License.
16  *
17  ****************************************************************************/
18 /****************************************************************************
19  *
20  * Copyright (C) 2009, 2012, 2014-2015 Gregory Nutt. All rights reserved.
21  * Author: Gregory Nutt <gnutt@nuttx.org>
22  *
23  * Redistribution and use in source and binary forms, with or without
24  * modification, are permitted provided that the following conditions
25  * are met:
26  *
27  * 1. Redistributions of source code must retain the above copyright
28  * notice, this list of conditions and the following disclaimer.
29  * 2. Redistributions in binary form must reproduce the above copyright
30  * notice, this list of conditions and the following disclaimer in
31  * the documentation and/or other materials provided with the
32  * distribution.
33  * 3. Neither the name NuttX nor the names of its contributors may be
34  * used to endorse or promote products derived from this software
35  * without specific prior written permission.
36  *
37  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
38  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
39  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
40  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
41  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
42  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
43  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
44  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
45  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
46  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
47  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
48  * POSSIBILITY OF SUCH DAMAGE.
49  *
50  ****************************************************************************/
58 #ifndef __INCLUDE_MATH_H
61 #define __INCLUDE_MATH_H
62 
63 /****************************************************************************
64  * Included Files
65  ****************************************************************************/
66 
67 #include <tinyara/config.h>
68 
69 /* If CONFIG_ARCH_MATH_H is defined, then the top-level Makefile will copy
70  * this header file to include/math.h where it will become the system math.h
71  * header file. In this case, the architecture specific code must provide
72  * an arch/<architecture>/include/math.h file which will be included below:
73  */
74 
75 #ifdef CONFIG_ARCH_MATH_H
76 #include <arch/math.h>
77 
78 /* If CONFIG_LIBM is enabled, then the math library at lib/math will be
79  * built. This library was taken from the math library developed for the
80  * Rhombus OS by Nick Johnson (https://github.com/nickbjohnson4224/rhombus).
81  * The port or the Rhombus math library was contributed by Darcy Gong.
82  */
83 
84 #elif defined(CONFIG_LIBM)
85 
86 /****************************************************************************
87  * Copyright (C) 2009-2011 Nick Johnson <nickbjohnson4224 at gmail.com>
88  *
89  * Permission to use, copy, modify, and distribute this software for any
90  * purpose with or without fee is hereby granted, provided that the above
91  * copyright notice and this permission notice appear in all copies.
92  *
93  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
94  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
95  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
96  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
97  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
98  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
99  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
100  *
101  ****************************************************************************/
102 
103 /****************************************************************************
104  * Included Files
105  ****************************************************************************/
106 
107 #include <tinyara/config.h>
108 #include <tinyara/compiler.h>
109 
110 /****************************************************************************
111  * Pre-processor Definitions
112  ****************************************************************************/
113 
114 /* General Constants ********************************************************/
115 
116 #define INFINITY (1.0/0.0)
117 #define NAN (0.0/0.0)
118 #define HUGE_VAL INFINITY
119 
120 #define isnan(x) ((x) != (x))
121 #define isinf(x) (((x) == INFINITY) || ((x) == -INFINITY))
122 #define isfinite(x) (!(isinf(x)) && (x != NAN))
123 
124 static __inline unsigned __FLOAT_BITS(float __f)
125 {
126  union {
127  float __f;
128  unsigned __i;
129  } __u;
130  __u.__f = __f;
131  return __u.__i;
132 }
133 
134 #if CONFIG_HAVE_DOUBLE
135 static __inline unsigned long long __DOUBLE_BITS(double __f)
136 {
137  union {
138  double __f;
139  unsigned long long __i;
140  } __u;
141  __u.__f = __f;
142  return __u.__i;
143 }
144 #endif
145 
146 #define signbit(x) ( \
147  sizeof(x) == sizeof(float) ? (int)(__FLOAT_BITS(x) >> 31) : \
148  sizeof(x) == sizeof(double) ? (int)(__DOUBLE_BITS(x) >> 63) : \
149  (int)(__DOUBLE_BITS(x) >> 63))
150 
151 /* Exponential and Logarithmic constants ************************************/
152 
153 #define M_E 2.7182818284590452353602874713526625
154 #define M_SQRT2 1.4142135623730950488016887242096981
155 #define M_SQRT1_2 0.7071067811865475244008443621048490
156 #define M_LOG2E 1.4426950408889634073599246810018921
157 #define M_LOG10E 0.4342944819032518276511289189166051
158 #define M_LN2 0.6931471805599453094172321214581765
159 #define M_LN10 2.3025850929940456840179914546843642
160 
161 /* Trigonometric Constants **************************************************/
162 
163 #define M_PI 3.1415926535897932384626433832795029
164 #define M_PI_2 1.5707963267948966192313216916397514
165 #define M_PI_4 0.7853981633974483096156608458198757
166 #define M_1_PI 0.3183098861837906715377675267450287
167 #define M_2_PI 0.6366197723675813430755350534900574
168 #define M_2_SQRTPI 1.1283791670955125738961589031215452
169 
170 /****************************************************************************
171  * Public Function Prototypes
172  ****************************************************************************/
173 
174 #if defined(__cplusplus)
175 extern "C" {
176 #endif
177 
178 /* General Functions ******************************************************* */
186 float ceilf(float x);
187 #ifdef CONFIG_HAVE_DOUBLE
188 
195 double ceil(double x);
196 #endif
197 #ifdef CONFIG_HAVE_LONG_DOUBLE
198 
205 long double ceill(long double x);
206 #endif
207 
214 float floorf(float x);
215 #ifdef CONFIG_HAVE_DOUBLE
216 
223 double floor(double x);
224 #endif
225 #ifdef CONFIG_HAVE_LONG_DOUBLE
226 
233 long double floorl(long double x);
234 #endif
235 
242 float roundf(float x);
243 #ifdef CONFIG_HAVE_DOUBLE
244 
251 double round(double x);
252 #endif
253 #ifdef CONFIG_HAVE_LONG_DOUBLE
254 
261 long double roundl(long double x);
262 #endif
263 
270 float rintf(float x); /* Not implemented */
271 #ifdef CONFIG_HAVE_DOUBLE
272 
279 double rint(double x);
280 #endif
281 #ifdef CONFIG_HAVE_LONG_DOUBLE
282 
289 long double rintl(long double x); /* Not implemented */
290 #endif
291 
298 float fabsf(float x);
299 #ifdef CONFIG_HAVE_DOUBLE
300 
307 double fabs(double x);
308 #endif
309 #ifdef CONFIG_HAVE_LONG_DOUBLE
310 
317 long double fabsl(long double x);
318 #endif
319 
323 float modff(float x, float *iptr);
324 #ifdef CONFIG_HAVE_DOUBLE
325 
328 double modf(double x, double *iptr);
329 #endif
330 
333 #ifdef CONFIG_HAVE_LONG_DOUBLE
334 long double modfl(long double x, long double *iptr);
335 #endif
336 
339 float fmodf(float x, float div);
340 #ifdef CONFIG_HAVE_DOUBLE
341 
344 double fmod(double x, double div);
345 #endif
346 #ifdef CONFIG_HAVE_LONG_DOUBLE
347 
350 long double fmodl(long double x, long double div);
351 #endif
352 /* Exponential and Logarithmic Functions *********************************** */
356 float powf(float b, float e);
360 #ifdef CONFIG_HAVE_DOUBLE
361 
368 double pow(double b, double e);
369 #endif
370 #ifdef CONFIG_HAVE_LONG_DOUBLE
371 
375 long double powl(long double b, long double e);
376 #endif
377 
387 float expf(float x);
395 #define expm1f(x) (expf(x) - 1.0)
396 #ifdef CONFIG_HAVE_DOUBLE
397 
404 double exp(double x);
405 #define expm1(x) (exp(x) - 1.0)
406 #endif
407 #ifdef CONFIG_HAVE_LONG_DOUBLE
408 
415 long double expl(long double x);
416 #define expm1l(x) (expl(x) - 1.0)
417 #endif
418 
425 float exp2f(float x);
426 #ifdef CONFIG_HAVE_DOUBLE
427 
434 double exp2(double x);
435 #endif
436 #ifdef CONFIG_HAVE_LONG_DOUBLE
437 
444 long double exp2l(long double x);
445 #endif
446 #ifdef CONFIG_HAVE_DOUBLE
447 
451 double __cos(double x, double y);
455 double __sin(double x, double y, int iy);
459 double gamma(double x);
463 double lgamma(double x);
467 #endif
468 
472 float logf(float x);
473 #ifdef CONFIG_HAVE_DOUBLE
474 
477 double log(double x);
478 #endif
479 #ifdef CONFIG_HAVE_LONG_DOUBLE
480 
483 long double logl(long double x);
484 #endif
485 
488 float log10f(float x);
489 #if CONFIG_HAVE_DOUBLE
490 
493 double log10(double x);
494 #endif
495 #ifdef CONFIG_HAVE_LONG_DOUBLE
496 
499 long double log10l(long double x);
500 #endif
501 
511 float log2f(float x);
512 #ifdef CONFIG_HAVE_DOUBLE
513 
520 double log2(double x);
521 #endif
522 #ifdef CONFIG_HAVE_LONG_DOUBLE
523 
530 long double log2l(long double x);
531 #endif
532 
539 float cbrtf(float x);
540 #ifdef CONFIG_HAVE_DOUBLE
541 
548 double cbrt(double x);
549 #endif
550 #ifdef CONFIG_HAVE_LONG_DOUBLE
551 
558 long double cbrtl(long double x);
559 #endif
560 
567 float sqrtf(float x);
568 #ifdef CONFIG_HAVE_DOUBLE
569 
576 double sqrt(double x);
577 #endif
578 #ifdef CONFIG_HAVE_LONG_DOUBLE
579 
586 long double sqrtl(long double x);
587 #endif
588 
595 float ldexpf(float x, int n);
596 #ifdef CONFIG_HAVE_DOUBLE
597 
604 double ldexp(double x, int n);
605 #endif
606 #ifdef CONFIG_HAVE_LONG_DOUBLE
607 
614 long double ldexpl(long double x, int n);
615 #endif
616 
623 float frexpf(float x, int *exp);
624 #ifdef CONFIG_HAVE_DOUBLE
625 
632 double frexp(double x, int *exp);
633 #endif
634 #ifdef CONFIG_HAVE_LONG_DOUBLE
635 
642 long double frexpl(long double x, int *exp);
643 #endif
644 
645 /* Trigonometric Functions ************************************************* */
653 float sinf(float x);
654 #ifdef CONFIG_HAVE_DOUBLE
655 
662 double sin(double x);
663 #endif
664 #ifdef CONFIG_HAVE_LONG_DOUBLE
665 
672 long double sinl(long double x);
673 #endif
674 
681 float cosf(float x);
682 #ifdef CONFIG_HAVE_DOUBLE
683 
690 double cos(double x);
691 #endif
692 #ifdef CONFIG_HAVE_LONG_DOUBLE
693 
700 long double cosl(long double x);
701 #endif
702 
709 float tanf(float x);
710 #if CONFIG_HAVE_DOUBLE
711 
718 double tan(double x);
719 #endif
720 #ifdef CONFIG_HAVE_LONG_DOUBLE
721 
728 long double tanl(long double x);
729 #endif
730 
737 float asinf(float x);
738 #ifdef CONFIG_HAVE_DOUBLE
739 
746 double asin(double x);
747 #endif
748 #ifdef CONFIG_HAVE_LONG_DOUBLE
749 
756 long double asinl(long double x);
757 #endif
758 
765 float acosf(float x);
766 #if CONFIG_HAVE_DOUBLE
767 
774 double acos(double x);
775 #endif
776 #ifdef CONFIG_HAVE_LONG_DOUBLE
777 
784 long double acosl(long double x);
785 #endif
786 
793 float atanf(float x);
794 #ifdef CONFIG_HAVE_DOUBLE
795 
802 double atan(double x);
803 #endif
804 #ifdef CONFIG_HAVE_LONG_DOUBLE
805 
812 long double atanl(long double x);
813 #endif
814 
821 float atan2f(float y, float x);
822 #ifdef CONFIG_HAVE_DOUBLE
823 
830 double atan2(double y, double x);
831 #endif
832 #ifdef CONFIG_HAVE_LONG_DOUBLE
833 
840 long double atan2l(long double y, long double x);
841 #endif
842 
849 float sinhf(float x);
850 #ifdef CONFIG_HAVE_DOUBLE
851 
858 double sinh(double x);
859 #endif
860 #ifdef CONFIG_HAVE_LONG_DOUBLE
861 
868 long double sinhl(long double x);
869 #endif
870 
877 float coshf(float x);
878 #ifdef CONFIG_HAVE_DOUBLE
879 
886 double cosh(double x);
887 #endif
888 #ifdef CONFIG_HAVE_LONG_DOUBLE
889 
896 long double coshl(long double x);
897 #endif
898 
905 float tanhf(float x);
906 #ifdef CONFIG_HAVE_DOUBLE
907 
914 double tanh(double x);
915 #endif
916 #ifdef CONFIG_HAVE_LONG_DOUBLE
917 
924 long double tanhl(long double x);
925 #endif
926 
933 float asinhf(float x);
934 #ifdef CONFIG_HAVE_DOUBLE
935 
942 double asinh(double x);
943 #endif
944 #ifdef CONFIG_HAVE_LONG_DOUBLE
945 
952 long double asinhl(long double x);
953 #endif
954 
961 float acoshf(float x);
962 #ifdef CONFIG_HAVE_DOUBLE
963 
970 double acosh(double x);
971 #endif
972 #ifdef CONFIG_HAVE_LONG_DOUBLE
973 
980 long double acoshl(long double x);
981 #endif
982 
989 float atanhf(float x);
990 #ifdef CONFIG_HAVE_DOUBLE
991 
998 double atanh(double x);
999 #endif
1000 #ifdef CONFIG_HAVE_LONG_DOUBLE
1001 
1008 long double atanhl(long double x);
1009 #endif
1010 
1017 float erff(float x);
1022 #define erfcf(x) (1 - erff(x))
1023 #ifdef CONFIG_HAVE_DOUBLE
1024 
1034 double erf(double x);
1035 #define erfc(x) (1 - erf(x))
1036 #endif
1037 #ifdef CONFIG_HAVE_LONG_DOUBLE
1038 
1045 long double erfl(long double x);
1046 #define erfcl(x) (1 - erfl(x))
1047 #endif
1048 
1055 float copysignf(float x, float y);
1056 #ifdef CONFIG_HAVE_DOUBLE
1057 
1064 double copysign(double x, double y);
1065 #endif
1066 #ifdef CONFIG_HAVE_LONG_DOUBLE
1067 
1074 long double copysignl(long double x, long double y);
1075 #endif
1076 
1083 float truncf(float x);
1084 #ifdef CONFIG_HAVE_DOUBLE
1085 
1092 double trunc(double x);
1093 #endif
1094 #ifdef CONFIG_HAVE_LONG_DOUBLE
1095 
1102 long double truncl(long double x);
1103 #endif
1104 
1111 float fdimf(float x, float y);
1112 #ifdef CONFIG_HAVE_DOUBLE
1113 
1120 double fdim(double x, double y);
1121 #endif
1122 #ifdef CONFIG_HAVE_LONG_DOUBLE
1123 
1130 long double fdiml(long double x, long double y);
1131 #endif
1132 
1139 float fmaxf(float x, float y);
1140 #ifdef CONFIG_HAVE_DOUBLE
1141 
1148 double fmax(double x, double y);
1149 #endif
1150 #ifdef CONFIG_HAVE_LONG_DOUBLE
1151 
1158 long double fmaxl(long double x, long double y);
1159 #endif
1160 
1167 float fminf(float x, float y);
1168 #ifdef CONFIG_HAVE_DOUBLE
1169 
1176 double fmin(double x, double y);
1177 #endif
1178 #ifdef CONFIG_HAVE_LONG_DOUBLE
1179 
1186 long double fminl(long double x, long double y);
1187 #endif
1188 
1195 float hypotf(float x, float y);
1196 #ifdef CONFIG_HAVE_DOUBLE
1197 
1204 double hypot(double x, double y);
1205 #endif
1206 #ifdef CONFIG_HAVE_LONG_DOUBLE
1207 
1214 long double hypotl(long double x, long double y);
1215 #endif
1216 
1223 float scalbnf(float x, int exp);
1224 #ifdef CONFIG_HAVE_DOUBLE
1225 
1232 double scalbn(double x, int exp);
1233 #endif
1234 #ifdef CONFIG_HAVE_LONG_DOUBLE
1235 
1242 long double scalbnl(long double x, int exp);
1243 #endif
1244 
1253 float j0f(float x);
1263 float j1f(float x);
1274 float jnf(int n, float x);
1275 #ifdef CONFIG_HAVE_DOUBLE
1276 
1283 double j0(double x);
1291 double j1(double x);
1299 double jn(int n, double x);
1300 #endif
1301 
1311 float y0f(float x);
1322 float y1f(float x);
1334 float ynf(int n, float x);
1335 #ifdef CONFIG_HAVE_DOUBLE
1336 
1343 double y0(double x);
1351 double y1(double x);
1359 double yn(int n, double x);
1360 #endif
1361 #ifdef CONFIG_HAVE_DOUBLE
1362 
1369 double nextafter(double x, double y);
1370 #endif
1371 
1378 float nextafterf(float x, float y);
1379 #ifdef CONFIG_HAVE_LONG_DOUBLE
1380 
1387 long double nextafterl(long double x, long double y);
1388 #endif
1389 #ifdef CONFIG_HAVE_DOUBLE
1390 
1397 double nexttoward(double x, long double y);
1398 #endif
1399 
1406 float nexttowardf(float x, long double y);
1407 #ifdef CONFIG_HAVE_LONG_DOUBLE
1408 
1415 long double nexttowardl(long double x, long double y);
1416 #endif
1417 #ifdef CONFIG_HAVE_DOUBLE
1418 
1425 double remainder(double x, double y);
1426 #endif
1427 
1434 float remainderf(float x, float y);
1435 #ifdef CONFIG_HAVE_LONG_DOUBLE
1436 
1443 long double remainderl(long double x, long double y);
1444 #endif
1445 #ifdef CONFIG_HAVE_DOUBLE
1446 
1453 double remquo(double x, double y, int *quo);
1454 #endif
1455 
1462 float remquof(float x, float y, int *quo);
1463 #ifdef CONFIG_HAVE_LONG_DOUBLE
1464 
1471 long double remquol(long double x, long double y, int *quo);
1472 #endif
1473 
1477 #define nanf(x) ((float)(NAN))
1478 
1481 #ifdef CONFIG_HAVE_DOUBLE
1482 #define nan(x) ((double)(NAN))
1483 #endif
1484 #ifdef CONFIG_HAVE_LONG_DOUBLE
1485 #define nanl(x) ((long double)(NAN))
1486 #endif
1487 
1491 #if defined(__cplusplus)
1492 }
1493 #endif
1494 #endif /* CONFIG_LIBM */
1495 #endif /* __INCLUDE_MATH_H */
1496 
long double atanhl(long double x)
inverse hyperbolic tangent functions
double atan2(double y, double x)
arc tangent function
double j0(double x)
Bessel functions of the first kind.
float coshf(float x)
hyperbolic cosine functions
long double asinl(long double x)
arc sine function
float sinhf(float x)
hyperbolic sine functions
double acosh(double x)
inverse hyperbolic cosine functions
long double ldexpl(long double x, int n)
load exponent of a floating-point number
float log2f(float x)
compute base 2 logarithm functions
long double floorl(long double x)
floor function
float acosf(float x)
float frexpf(float x, int *exp)
extract mantissa and exponent from a double precision number
double fabs(double x)
absolute value function
float y0f(float x)
returns Bessel functions of x of the second kind of orders 0
long double rintl(long double x)
round-to-nearest integral value
double rint(double x)
round-to-nearest integral value
float copysignf(float x, float y)
number manipulation function
long double cosl(long double x)
cosine function
long double atanl(long double x)
arc tangent function
double nexttoward(double x, long double y)
next representable floating-point number
long double truncl(long double x)
round to truncated integer value
long double acoshl(long double x)
inverse hyperbolic cosine functions
float nexttowardf(float x, long double y)
next representable floating-point number
float erff(float x)
error functions
double exp2(double x)
exponential base 2 functions
double fmin(double x, double y)
determine minimum numeric value of two floating-point numbers
float rintf(float x)
round-to-nearest integral value
long double sqrtl(long double x)
square root function
long double hypotl(long double x, long double y)
Euclidean distance function.
double nextafter(double x, double y)
next representable floating-point number
float asinhf(float x)
inverse hyperbolic sine functions
long double log2l(long double x)
compute base 2 logarithm functions
double cbrt(double x)
cube root functions
float expf(float x)
exponential function
long double expl(long double x)
exponential function
float j1f(float x)
returns Bessel functions of x of the first kind of orders 1
double erf(double x)
error functions
float sinf(float x)
sine function
double pow(double b, double e)
power function
double y1(double x)
Bessel functions of the second kind.
long double copysignl(long double x, long double y)
number manipulation function
long double sinhl(long double x)
hyperbolic sine functions
float atanf(float x)
arc cosine functions
long double cbrtl(long double x)
cube root functions
long double coshl(long double x)
hyperbolic cosine functions
long double fminl(long double x, long double y)
determine minimum numeric value of two floating-point numbers
long double acosl(long double x)
arc cosine functions
long double exp2l(long double x)
exponential base 2 functions
double hypot(double x, double y)
Euclidean distance function.
long double fdiml(long double x, long double y)
compute positive difference between two floating-point numbers
double exp(double x)
exponential function
float tanhf(float x)
hyperbolic tangent functions
float remainderf(float x, float y)
remainder function
long double nextafterl(long double x, long double y)
next representable floating-point number
double sin(double x)
sine function
double y0(double x)
Bessel functions of the second kind.
float atanhf(float x)
inverse hyperbolic tangent functions
float jnf(int n, float x)
returns Bessel functions of x of the first kind of orders n
float sqrtf(float x)
square root function
float ldexpf(float x, int n)
load exponent of a floating-point number
long double nexttowardl(long double x, long double y)
next representable floating-point number
double remainder(double x, double y)
remainder function
float ynf(int n, float x)
returns Bessel functions of x of the second kind of orders n
float tanf(float x)
tangent function
long double erfl(long double x)
error functions
double copysign(double x, double y)
number manipulation function
double atan(double x)
arc tangent function
double j1(double x)
Bessel functions of the first kind.
double frexp(double x, int *exp)
extract mantissa and exponent from a double precision number
double floor(double x)
floor function
float exp2f(float x)
exponential base 2 functions
long double remquol(long double x, long double y, int *quo)
remainder functions
double acos(double x)
arc cosine functions
float roundf(float x)
round to the nearest integer value in a floating-point format
double scalbn(double x, int exp)
compute exponent using FLT_RADIX
float cbrtf(float x)
cube root functions
long double frexpl(long double x, int *exp)
extract mantissa and exponent from a double precision number
double cos(double x)
cosine function
float scalbnf(float x, int exp)
compute exponent using FLT_RADIX
float y1f(float x)
returns Bessel functions of x of the second kind of orders 1
long double remainderl(long double x, long double y)
remainder function
double tanh(double x)
hyperbolic tangent functions
double round(double x)
round to the nearest integer value in a floating-point format
double remquo(double x, double y, int *quo)
remainder functions
float asinf(float x)
arc sine function
float fminf(float x, float y)
determine minimum numeric value of two floating-point numbers
long double atan2l(long double y, long double x)
arc tangent function
double atanh(double x)
inverse hyperbolic tangent functions
double asinh(double x)
inverse hyperbolic sine functions
double sqrt(double x)
square root function
double tan(double x)
tangent function
double yn(int n, double x)
Bessel functions of the second kind.
float fdimf(float x, float y)
compute positive difference between two floating-point numbers
float atan2f(float y, float x)
arc tangent function
float acoshf(float x)
inverse hyperbolic cosine functions
long double tanhl(long double x)
hyperbolic tangent functions
double trunc(double x)
round to truncated integer value
double ceil(double x)
ceiling value function
long double sinl(long double x)
sine function
double jn(int n, double x)
Bessel functions of the first kind.
long double fmaxl(long double x, long double y)
determine maximum numeric value of two floating-point numbers
long double fabsl(long double x)
absolute value function
float truncf(float x)
round to truncated integer value
double log2(double x)
compute base 2 logarithm functions
double sinh(double x)
hyperbolic sine functions
long double scalbnl(long double x, int exp)
compute exponent using FLT_RADIX
float nextafterf(float x, float y)
next representable floating-point number
double asin(double x)
arc sine function
div_t div(int numer, int denom)
compute the quotient and remainder of an integer division
float fabsf(float x)
absolute value function
float fmaxf(float x, float y)
double ldexp(double x, int n)
load exponent of a floating-point number
double fmax(double x, double y)
determine maximum numeric value of two floating-point numbers
double cosh(double x)
hyperbolic cosine functions
long double roundl(long double x)
round to the nearest integer value in a floating-point format
float cosf(float x)
cosine function
float hypotf(float x, float y)
Euclidean distance function.
long double tanl(long double x)
tangent function
long double ceill(long double x)
ceiling value function
float floorf(float x)
floor function
float ceilf(float x)
ceiling value function
long double asinhl(long double x)
inverse hyperbolic sine functions
float remquof(float x, float y, int *quo)
remainder functions
double fdim(double x, double y)
compute positive difference between two floating-point numbers
float j0f(float x)
returns Bessel functions of x of the first kind of orders 0