Iros
 
Loading...
Searching...
No Matches
math.h
Go to the documentation of this file.
1#pragma once
2
3#include <ccpp/bits/config.h>
4
6typedef float float_t;
7typedef double double_t;
8
9#define HUGE_VAL __builtin_huge_val()
10
11#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
12#define HUGE_VALF __builtin_huge_valf()
13#define HUGE_VALL __builtin_huge_vall()
14
15#define INFINITY __builtin_inff()
16#define NAN __builtin_nanf("")
17
18#define FP_NAN 0
19#define FP_INFINITE 1
20#define FP_ZERO 2
21#define FP_SUBNORMAL 3
22#define FP_NORMAL 4
23
24#define fpclassify(x) __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_ZERO, FP_SUBNORMAL, FP_NORMAL, x)
25
26#define isfinite(x) __builtin_isfinite(x)
27#define isinf(x) __builtin_isinf_sign(x)
28#define isnan(x) __builtin_isnan(x)
29#define isnormal(x) __builtin_isnormal(x)
30
31#define signbit(x) __builtin_signbit(x)
32#define isgreater(x, y) __builtin_isgreater(x, y)
33#define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
34#define isless(x, y) __builtin_isless(x, y)
35#define islessequal(x, y) __builtin_islessequal(x, y)
36#define islessgreater(x, y) __builtin_islessgreater(x, y)
37#define isunordered(x, y) __builtin_isunordered(x, y)
38#endif
39
40double fabs(double __x);
41#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
42float fabsf(float __x);
43long double fabsl(long double __x);
44#endif
45
46double fmod(double __x, double __y);
47#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
48float fmodf(float __x, float __y);
49long double fmodl(long double __x, long double __y);
50#endif
51
52#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
53double remainder(double __x, double __y);
54float remainderf(float __x, float __y);
55long double remainderl(long double __x, long double __y);
56
57double remquo(double __x, double __y, int* __quo);
58float remquof(float __x, float __y, int* __quo);
59long double remquol(long double __x, long double __y, int* __quo);
60
61double fma(double __x, double __y, double __z);
62float fmaf(float __x, float __y, float __z);
63long double fmal(long double __x, long double __y, long double __z);
64
65double fmax(double __x, double __y);
66float fmaxf(float __x, float __y);
67long double fmaxl(long double __x, long double __y);
68
69double fmin(double __x, double __y);
70float fminf(float __x, float __y);
71long double fminl(long double __x, long double __y);
72
73double fdim(double __x, double __y);
74float fdimf(float __x, float __y);
75long double fdiml(long double __x, long double __y);
76
77double nan(char const* __arg);
78float nanf(char const* __arg);
79long double nanl(char const* __arg);
80#endif
81
82double exp(double __x);
83#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
84float expf(float __x);
85long double expl(long double __x);
86#endif
87
88#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
89double exp2(double __x);
90float exp2f(float __x);
91long double exp2l(long double __x);
92
93double exmpm1(double __x);
94float expm1f(float __x);
95long double expm1l(long double __x);
96#endif
97
98double log(double __x);
99#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
100float logf(float __x);
101long double logl(long double __x);
102#endif
103
104double log10(double __x);
105#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
106float log10f(float __x);
107long double log10l(long double __x);
108#endif
109
110#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
111double log2(double __x);
112float log2f(float __x);
113long double log2l(long double __x);
114
115double log1p(double __x);
116float log1pf(float __x);
117long double log1pl(long double __x);
118#endif
119
120double pow(double __x, double __y);
121#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
122float powf(float __x, float __y);
123long double powl(long double __x, long double __y);
124#endif
125
126double sqrt(double __x);
127#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
128float sqrtf(float __x);
129long double sqrtl(long double __x);
130#endif
131
132#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
133double cbrt(double __x);
134float cbrtf(float __x);
135long double cbrtl(long double __x);
136
137double hypot(double __x, double __y);
138float hypotf(float __x, float __y);
139long double hypotl(long double __x, long double __y);
140#endif
141
142double sin(double __x);
143#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
144float sinf(float __x);
145long double sinl(long double __x);
146#endif
147
148double cos(double __x);
149#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
150float cosf(float __x);
151long double cosl(long double __x);
152#endif
153
154double tan(double __x);
155#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
156float tanf(float __x);
157long double tanl(long double __x);
158#endif
159
160double asin(double __x);
161#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
162float asinf(float __x);
163long double asinl(long double __x);
164#endif
165
166double acos(double __x);
167#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
168float acosf(float __x);
169long double acosl(long double __x);
170#endif
171
172double atan(double __x);
173#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
174float atanf(float __x);
175long double atanl(long double __x);
176#endif
177
178double atan2(double __y, double __x);
179#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
180float atan2f(float __y, float __x);
181long double atan2l(long double __y, long double __x);
182#endif
183
184double sinh(double __x);
185#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
186float sinhf(float __x);
187long double sinhl(long double __x);
188#endif
189
190double cosh(double __x);
191#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
192float coshf(float __x);
193long double coshl(long double __x);
194#endif
195
196double tanh(double __x);
197#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
198float tanhf(float __x);
199long double tanhl(long double __x);
200#endif
201
202#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
203double asinh(double __x);
204float asinhf(float __x);
205long double asinhl(long double __x);
206
207double acosh(double __x);
208float acoshf(float __x);
209long double acoshl(long double __x);
210
211double atanh(double __x);
212float atanhf(float __x);
213long double atanhl(long double __x);
214#endif
215
216#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
217double erf(double __x);
218float erff(float __x);
219long double erfl(long double __x);
220
221double erfc(double __x);
222float erfcf(float __x);
223long double erfcl(long double __x);
224
225double tgamma(double __x);
226float tgammaf(float __x);
227long double tgammal(long double __x);
228
229double lgamma(double __x);
230float lgammaf(float __x);
231long double lgammal(long double __x);
232#endif
233
234double ceil(double __x);
235#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
236float ceilf(float __x);
237long double ceill(long double __x);
238#endif
239
240double floor(double __x);
241#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
242float floorf(float __x);
243long double floorl(long double __x);
244#endif
245
246#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
247double trunc(double __x);
248float truncf(float __x);
249long double truncl(long double __x);
250
251double round(double __x);
252float roundf(float __x);
253long double roundl(long double __x);
254
255long lround(double __x);
256long lroundf(float __x);
257long lroundl(long double __x);
258
259long long llround(double __x);
260long long llroundf(float __x);
261long long llroundl(long double __x);
262
263double nearbyint(double __x);
264float nearbyintf(float __x);
265long double nearbyintl(long double __x);
266
267double rint(double __x);
268float rintf(float __x);
269long double rintl(long double __x);
270
271long lrint(double __x);
272long lrintf(float __x);
273long lrintl(long double __x);
274
275long long llrint(double __x);
276long long llrintf(float __x);
277long long llrintl(long double __x);
278#endif
279
280double frexp(double __x, int* __exp);
281#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
282float frexpf(float __x, int* __exp);
283long double frexpl(long double __x, int* __exp);
284#endif
285
286double ldexp(double __x, int __exp);
287#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
288float ldexpf(float __x, int __exp);
289long double ldexpl(long double __x, int __exp);
290#endif
291
292double modf(double __x, double* __iptr);
293#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
294float modff(float __x, float* __iptr);
295long double modfl(long double __x, long double* __iptr);
296#endif
297
298#if defined(__CCPP_C99) || defined(__CCPP_POSIX_EXTENSIONS)
299double scalbn(double __x, int __n);
300float scalbnf(float __x, int __n);
301long double scalbnl(long double __x, int __n);
302
303double scalbln(double __x, long __n);
304float scalblnf(float __x, long __n);
305long double scalblnl(long double __x, long __n);
306
307int ilogb(double __x);
308int ilogbf(float __x);
309int ilogbl(long double __x);
310
311double logb(double __x);
312float logbf(float __x);
313long double logbl(long double __x);
314
315double nextafter(double __x, double __y);
316float nextafterf(float __x, float __y);
317long double nextafterl(long double __x, long double __y);
318
319double nexttoward(double __x, long double __y);
320float nexttowardf(float __x, long double __y);
321long double nexttowardl(long double __x, long double __y);
322
323double copysign(double __x, double __y);
324float copysignf(float __x, float __y);
325long double copysignl(long double __x, long double __y);
326#endif
327
#define __CCPP_END_DECLARATIONS
Definition config.h:8
#define __CCPP_BEGIN_DECLARATIONS
Definition config.h:7
double atan2(double __y, double __x)
long double fmaxl(long double __x, long double __y)
double fabs(double __x)
double remquo(double __x, double __y, int *__quo)
long double hypotl(long double __x, long double __y)
long double logbl(long double __x)
float remquof(float __x, float __y, int *__quo)
double log2(double __x)
long double frexpl(long double __x, int *__exp)
float exp2f(float __x)
double floor(double __x)
float frexpf(float __x, int *__exp)
int ilogbl(long double __x)
float fminf(float __x, float __y)
float nextafterf(float __x, float __y)
long double truncl(long double __x)
double scalbn(double __x, int __n)
double trunc(double __x)
long double scalblnl(long double __x, long __n)
long double tgammal(long double __x)
double atanh(double __x)
long double scalbnl(long double __x, int __n)
long double log10l(long double __x)
float expf(float __x)
double remainder(double __x, double __y)
float logf(float __x)
float copysignf(float __x, float __y)
long double floorl(long double __x)
long double powl(long double __x, long double __y)
double cosh(double __x)
double copysign(double __x, double __y)
long lrintf(float __x)
float cosf(float __x)
double log10(double __x)
float atanhf(float __x)
long double roundl(long double __x)
double atan(double __x)
int ilogbf(float __x)
float erff(float __x)
long double asinl(long double __x)
double pow(double __x, double __y)
float scalblnf(float __x, long __n)
long long llrintf(float __x)
double sin(double __x)
long double nexttowardl(long double __x, long double __y)
long double acosl(long double __x)
long double atan2l(long double __y, long double __x)
long double expl(long double __x)
long double remainderl(long double __x, long double __y)
double exp(double __x)
long lrintl(long double __x)
double tgamma(double __x)
double cos(double __x)
__CCPP_BEGIN_DECLARATIONS typedef float float_t
Definition math.h:6
long double fmal(long double __x, long double __y, long double __z)
long double remquol(long double __x, long double __y, int *__quo)
double fmin(double __x, double __y)
double exp2(double __x)
long double logl(long double __x)
float fdimf(float __x, float __y)
float roundf(float __x)
float log1pf(float __x)
double ceil(double __x)
float erfcf(float __x)
double fdim(double __x, double __y)
float fabsf(float __x)
float tgammaf(float __x)
float logbf(float __x)
long double expm1l(long double __x)
long double sinhl(long double __x)
long double ldexpl(long double __x, int __exp)
double frexp(double __x, int *__exp)
double round(double __x)
long long llroundl(long double __x)
double hypot(double __x, double __y)
float remainderf(float __x, float __y)
long lroundf(float __x)
double asinh(double __x)
long double tanhl(long double __x)
float acoshf(float __x)
long double nearbyintl(long double __x)
float asinf(float __x)
float nearbyintf(float __x)
float ldexpf(float __x, int __exp)
double log(double __x)
double scalbln(double __x, long __n)
float cbrtf(float __x)
long double cosl(long double __x)
float powf(float __x, float __y)
long double cbrtl(long double __x)
float fmaf(float __x, float __y, float __z)
double modf(double __x, double *__iptr)
long double log1pl(long double __x)
long double lgammal(long double __x)
long double sinl(long double __x)
float floorf(float __x)
float fmodf(float __x, float __y)
float sinhf(float __x)
float hypotf(float __x, float __y)
double acosh(double __x)
double ldexp(double __x, int __exp)
double asin(double __x)
float ceilf(float __x)
long lrint(double __x)
float coshf(float __x)
float atan2f(float __y, float __x)
double cbrt(double __x)
long double fdiml(long double __x, long double __y)
float asinhf(float __x)
double exmpm1(double __x)
double tan(double __x)
double erf(double __x)
float fmaxf(float __x, float __y)
float log2f(float __x)
float tanhf(float __x)
long double acoshl(long double __x)
double lgamma(double __x)
long lround(double __x)
long double fabsl(long double __x)
long double nanl(char const *__arg)
long double sqrtl(long double __x)
float sinf(float __x)
long double atanhl(long double __x)
double sinh(double __x)
long double nextafterl(long double __x, long double __y)
float sqrtf(float __x)
long long llroundf(float __x)
double erfc(double __x)
long double atanl(long double __x)
double logb(double __x)
long lroundl(long double __x)
double double_t
Definition math.h:7
float scalbnf(float __x, int __n)
long double exp2l(long double __x)
float truncf(float __x)
double nearbyint(double __x)
long double fmodl(long double __x, long double __y)
int ilogb(double __x)
long double erfl(long double __x)
long long llround(double __x)
float modff(float __x, float *__iptr)
float expm1f(float __x)
long long llrintl(long double __x)
long double ceill(long double __x)
long double rintl(long double __x)
double nextafter(double __x, double __y)
long double modfl(long double __x, long double *__iptr)
double sqrt(double __x)
float nanf(char const *__arg)
float nexttowardf(float __x, long double __y)
long double asinhl(long double __x)
long double tanl(long double __x)
long double fminl(long double __x, long double __y)
float tanf(float __x)
double nexttoward(double __x, long double __y)
double rint(double __x)
float log10f(float __x)
double log1p(double __x)
double acos(double __x)
long long llrint(double __x)
long double erfcl(long double __x)
float lgammaf(float __x)
double fmod(double __x, double __y)
double tanh(double __x)
float acosf(float __x)
double fma(double __x, double __y, double __z)
float atanf(float __x)
float rintf(float __x)
long double coshl(long double __x)
long double log2l(long double __x)
double fmax(double __x, double __y)
double nan(char const *__arg)
long double copysignl(long double __x, long double __y)