Tizen RT Libs&Environment  v1.1 D4
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 
450 float logf(float x);
451 #ifdef CONFIG_HAVE_DOUBLE
452 
455 double log(double x);
456 #endif
457 #ifdef CONFIG_HAVE_LONG_DOUBLE
458 
461 long double logl(long double x);
462 #endif
463 
466 float log10f(float x);
467 #if CONFIG_HAVE_DOUBLE
468 
471 double log10(double x);
472 #endif
473 #ifdef CONFIG_HAVE_LONG_DOUBLE
474 
477 long double log10l(long double x);
478 #endif
479 
489 float log2f(float x);
490 #ifdef CONFIG_HAVE_DOUBLE
491 
498 double log2(double x);
499 #endif
500 #ifdef CONFIG_HAVE_LONG_DOUBLE
501 
508 long double log2l(long double x);
509 #endif
510 
517 float cbrtf(float x);
518 #ifdef CONFIG_HAVE_DOUBLE
519 
526 double cbrt(double x);
527 #endif
528 #ifdef CONFIG_HAVE_LONG_DOUBLE
529 
536 long double cbrtl(long double x);
537 #endif
538 
545 float sqrtf(float x);
546 #ifdef CONFIG_HAVE_DOUBLE
547 
554 double sqrt(double x);
555 #endif
556 #ifdef CONFIG_HAVE_LONG_DOUBLE
557 
564 long double sqrtl(long double x);
565 #endif
566 
573 float ldexpf(float x, int n);
574 #ifdef CONFIG_HAVE_DOUBLE
575 
582 double ldexp(double x, int n);
583 #endif
584 #ifdef CONFIG_HAVE_LONG_DOUBLE
585 
592 long double ldexpl(long double x, int n);
593 #endif
594 
601 float frexpf(float x, int *exp);
602 #ifdef CONFIG_HAVE_DOUBLE
603 
610 double frexp(double x, int *exp);
611 #endif
612 #ifdef CONFIG_HAVE_LONG_DOUBLE
613 
620 long double frexpl(long double x, int *exp);
621 #endif
622 
623 /* Trigonometric Functions ************************************************* */
631 float sinf(float x);
632 #ifdef CONFIG_HAVE_DOUBLE
633 
640 double sin(double x);
641 #endif
642 #ifdef CONFIG_HAVE_LONG_DOUBLE
643 
650 long double sinl(long double x);
651 #endif
652 
659 float cosf(float x);
660 #ifdef CONFIG_HAVE_DOUBLE
661 
668 double cos(double x);
669 #endif
670 #ifdef CONFIG_HAVE_LONG_DOUBLE
671 
678 long double cosl(long double x);
679 #endif
680 
687 float tanf(float x);
688 #if CONFIG_HAVE_DOUBLE
689 
696 double tan(double x);
697 #endif
698 #ifdef CONFIG_HAVE_LONG_DOUBLE
699 
706 long double tanl(long double x);
707 #endif
708 
715 float asinf(float x);
716 #ifdef CONFIG_HAVE_DOUBLE
717 
724 double asin(double x);
725 #endif
726 #ifdef CONFIG_HAVE_LONG_DOUBLE
727 
734 long double asinl(long double x);
735 #endif
736 
743 float acosf(float x);
744 #if CONFIG_HAVE_DOUBLE
745 
752 double acos(double x);
753 #endif
754 #ifdef CONFIG_HAVE_LONG_DOUBLE
755 
762 long double acosl(long double x);
763 #endif
764 
771 float atanf(float x);
772 #ifdef CONFIG_HAVE_DOUBLE
773 
780 double atan(double x);
781 #endif
782 #ifdef CONFIG_HAVE_LONG_DOUBLE
783 
790 long double atanl(long double x);
791 #endif
792 
799 float atan2f(float y, float x);
800 #ifdef CONFIG_HAVE_DOUBLE
801 
808 double atan2(double y, double x);
809 #endif
810 #ifdef CONFIG_HAVE_LONG_DOUBLE
811 
818 long double atan2l(long double y, long double x);
819 #endif
820 
827 float sinhf(float x);
828 #ifdef CONFIG_HAVE_DOUBLE
829 
836 double sinh(double x);
837 #endif
838 #ifdef CONFIG_HAVE_LONG_DOUBLE
839 
846 long double sinhl(long double x);
847 #endif
848 
855 float coshf(float x);
856 #ifdef CONFIG_HAVE_DOUBLE
857 
864 double cosh(double x);
865 #endif
866 #ifdef CONFIG_HAVE_LONG_DOUBLE
867 
874 long double coshl(long double x);
875 #endif
876 
883 float tanhf(float x);
884 #ifdef CONFIG_HAVE_DOUBLE
885 
892 double tanh(double x);
893 #endif
894 #ifdef CONFIG_HAVE_LONG_DOUBLE
895 
902 long double tanhl(long double x);
903 #endif
904 
911 float asinhf(float x);
912 #ifdef CONFIG_HAVE_DOUBLE
913 
920 double asinh(double x);
921 #endif
922 #ifdef CONFIG_HAVE_LONG_DOUBLE
923 
930 long double asinhl(long double x);
931 #endif
932 
939 float acoshf(float x);
940 #ifdef CONFIG_HAVE_DOUBLE
941 
948 double acosh(double x);
949 #endif
950 #ifdef CONFIG_HAVE_LONG_DOUBLE
951 
958 long double acoshl(long double x);
959 #endif
960 
967 float atanhf(float x);
968 #ifdef CONFIG_HAVE_DOUBLE
969 
976 double atanh(double x);
977 #endif
978 #ifdef CONFIG_HAVE_LONG_DOUBLE
979 
986 long double atanhl(long double x);
987 #endif
988 
995 float erff(float x);
1000 #define erfcf(x) (1 - erff(x))
1001 #ifdef CONFIG_HAVE_DOUBLE
1002 
1012 double erf(double x);
1013 #define erfc(x) (1 - erf(x))
1014 #endif
1015 #ifdef CONFIG_HAVE_LONG_DOUBLE
1016 
1023 long double erfl(long double x);
1024 #define erfcl(x) (1 - erfl(x))
1025 #endif
1026 
1033 float copysignf(float x, float y);
1034 #ifdef CONFIG_HAVE_DOUBLE
1035 
1042 double copysign(double x, double y);
1043 #endif
1044 #ifdef CONFIG_HAVE_LONG_DOUBLE
1045 
1052 long double copysignl(long double x, long double y);
1053 #endif
1054 
1061 float truncf(float x);
1062 #ifdef CONFIG_HAVE_DOUBLE
1063 
1070 double trunc(double x);
1071 #endif
1072 #ifdef CONFIG_HAVE_LONG_DOUBLE
1073 
1080 long double truncl(long double x);
1081 #endif
1082 
1089 float fdimf(float x, float y);
1090 #ifdef CONFIG_HAVE_DOUBLE
1091 
1098 double fdim(double x, double y);
1099 #endif
1100 #ifdef CONFIG_HAVE_LONG_DOUBLE
1101 
1108 long double fdiml(long double x, long double y);
1109 #endif
1110 
1117 float fmaxf(float x, float y);
1118 #ifdef CONFIG_HAVE_DOUBLE
1119 
1126 double fmax(double x, double y);
1127 #endif
1128 #ifdef CONFIG_HAVE_LONG_DOUBLE
1129 
1136 long double fmaxl(long double x, long double y);
1137 #endif
1138 
1145 float fminf(float x, float y);
1146 #ifdef CONFIG_HAVE_DOUBLE
1147 
1154 double fmin(double x, double y);
1155 #endif
1156 #ifdef CONFIG_HAVE_LONG_DOUBLE
1157 
1164 long double fminl(long double x, long double y);
1165 #endif
1166 
1173 float hypotf(float x, float y);
1174 #ifdef CONFIG_HAVE_DOUBLE
1175 
1182 double hypot(double x, double y);
1183 #endif
1184 #ifdef CONFIG_HAVE_LONG_DOUBLE
1185 
1192 long double hypotl(long double x, long double y);
1193 #endif
1194 
1201 float scalbnf(float x, int exp);
1202 #ifdef CONFIG_HAVE_DOUBLE
1203 
1210 double scalbn(double x, int exp);
1211 #endif
1212 #ifdef CONFIG_HAVE_LONG_DOUBLE
1213 
1220 long double scalbnl(long double x, int exp);
1221 #endif
1222 
1231 float j0f(float x);
1241 float j1f(float x);
1252 float jnf(int n, float x);
1253 #ifdef CONFIG_HAVE_DOUBLE
1254 
1261 double j0(double x);
1269 double j1(double x);
1277 double jn(int n, double x);
1278 #endif
1279 
1289 float y0f(float x);
1300 float y1f(float x);
1312 float ynf(int n, float x);
1313 #ifdef CONFIG_HAVE_DOUBLE
1314 
1321 double y0(double x);
1329 double y1(double x);
1337 double yn(int n, double x);
1338 #endif
1339 #ifdef CONFIG_HAVE_DOUBLE
1340 
1347 double nextafter(double x, double y);
1348 #endif
1349 
1356 float nextafterf(float x, float y);
1357 #ifdef CONFIG_HAVE_LONG_DOUBLE
1358 
1365 long double nextafterl(long double x, long double y);
1366 #endif
1367 #ifdef CONFIG_HAVE_DOUBLE
1368 
1375 double nexttoward(double x, long double y);
1376 #endif
1377 
1384 float nexttowardf(float x, long double y);
1385 #ifdef CONFIG_HAVE_LONG_DOUBLE
1386 
1393 long double nexttowardl(long double x, long double y);
1394 #endif
1395 #ifdef CONFIG_HAVE_DOUBLE
1396 
1403 double remainder(double x, double y);
1404 #endif
1405 
1412 float remainderf(float x, float y);
1413 #ifdef CONFIG_HAVE_LONG_DOUBLE
1414 
1421 long double remainderl(long double x, long double y);
1422 #endif
1423 #ifdef CONFIG_HAVE_DOUBLE
1424 
1431 double remquo(double x, double y, int *quo);
1432 #endif
1433 
1440 float remquof(float x, float y, int *quo);
1441 #ifdef CONFIG_HAVE_LONG_DOUBLE
1442 
1449 long double remquol(long double x, long double y, int *quo);
1450 #endif
1451 
1455 #define nanf(x) ((float)(NAN))
1456 
1459 #ifdef CONFIG_HAVE_DOUBLE
1460 #define nan(x) ((double)(NAN))
1461 #endif
1462 #ifdef CONFIG_HAVE_LONG_DOUBLE
1463 #define nanl(x) ((long double)(NAN))
1464 #endif
1465 
1469 #if defined(__cplusplus)
1470 }
1471 #endif
1472 #endif /* CONFIG_LIBM */
1473 #endif /* __INCLUDE_MATH_H */
1474 
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