math.h
6.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
#pragma once
// __clang_cuda_(c)math(.h) also provide `abs` which actually belong in
// cstdlib. We could split them out but for now we just include cstdlib from
// cmath.h which is what the systems I've seen do as well.
#include <stdlib.h>
double fabs(double __a);
double acos(double __a);
float acosf(float __a);
double acosh(double __a);
float acoshf(float __a);
double asin(double __a);
float asinf(float __a);
double asinh(double __a);
float asinhf(float __a);
double atan(double __a);
double atan2(double __a, double __b);
float atan2f(float __a, float __b);
float atanf(float __a);
double atanh(double __a);
float atanhf(float __a);
double cbrt(double __a);
float cbrtf(float __a);
double ceil(double __a);
float ceilf(float __a);
double copysign(double __a, double __b);
float copysignf(float __a, float __b);
double cos(double __a);
float cosf(float __a);
double cosh(double __a);
float coshf(float __a);
double cospi(double __a);
float cospif(float __a);
double cyl_bessel_i0(double __a);
float cyl_bessel_i0f(float __a);
double cyl_bessel_i1(double __a);
float cyl_bessel_i1f(float __a);
double erf(double __a);
double erfc(double __a);
float erfcf(float __a);
double erfcinv(double __a);
float erfcinvf(float __a);
double erfcx(double __a);
float erfcxf(float __a);
float erff(float __a);
double erfinv(double __a);
float erfinvf(float __a);
double exp(double __a);
double exp10(double __a);
float exp10f(float __a);
double exp2(double __a);
float exp2f(float __a);
float expf(float __a);
double expm1(double __a);
float expm1f(float __a);
float fabsf(float __a);
double fdim(double __a, double __b);
float fdimf(float __a, float __b);
double fdivide(double __a, double __b);
float fdividef(float __a, float __b);
double floor(double __f);
float floorf(float __f);
double fma(double __a, double __b, double __c);
float fmaf(float __a, float __b, float __c);
double fmax(double __a, double __b);
float fmaxf(float __a, float __b);
double fmin(double __a, double __b);
float fminf(float __a, float __b);
double fmod(double __a, double __b);
float fmodf(float __a, float __b);
double frexp(double __a, int *__b);
float frexpf(float __a, int *__b);
double hypot(double __a, double __b);
float hypotf(float __a, float __b);
int ilogb(double __a);
int ilogbf(float __a);
double j0(double __a);
float j0f(float __a);
double j1(double __a);
float j1f(float __a);
double jn(int __n, double __a);
float jnf(int __n, float __a);
double ldexp(double __a, int __b);
float ldexpf(float __a, int __b);
double lgamma(double __a);
float lgammaf(float __a);
long long llmax(long long __a, long long __b);
long long llmin(long long __a, long long __b);
long long llrint(double __a);
long long llrintf(float __a);
long long llround(double __a);
long long llroundf(float __a);
double log(double __a);
double log10(double __a);
float log10f(float __a);
double log1p(double __a);
float log1pf(float __a);
double log2(double __a);
float log2f(float __a);
double logb(double __a);
float logbf(float __a);
float logf(float __a);
long lrint(double __a);
long lrintf(float __a);
long lround(double __a);
long lroundf(float __a);
int max(int __a, int __b);
int min(int __a, int __b);
double modf(double __a, double *__b);
float modff(float __a, float *__b);
double nearbyint(double __a);
float nearbyintf(float __a);
double nextafter(double __a, double __b);
float nextafterf(float __a, float __b);
double norm(int __dim, const double *__t);
double norm3d(double __a, double __b, double __c);
float norm3df(float __a, float __b, float __c);
double norm4d(double __a, double __b, double __c, double __d);
float norm4df(float __a, float __b, float __c, float __d);
double normcdf(double __a);
float normcdff(float __a);
double normcdfinv(double __a);
float normcdfinvf(float __a);
float normf(int __dim, const float *__t);
double pow(double __a, double __b);
float powf(float __a, float __b);
double powi(double __a, int __b);
float powif(float __a, int __b);
double rcbrt(double __a);
float rcbrtf(float __a);
double remainder(double __a, double __b);
float remainderf(float __a, float __b);
double remquo(double __a, double __b, int *__c);
float remquof(float __a, float __b, int *__c);
double rhypot(double __a, double __b);
float rhypotf(float __a, float __b);
double rint(double __a);
float rintf(float __a);
double rnorm(int __a, const double *__b);
double rnorm3d(double __a, double __b, double __c);
float rnorm3df(float __a, float __b, float __c);
double rnorm4d(double __a, double __b, double __c, double __d);
float rnorm4df(float __a, float __b, float __c, float __d);
float rnormf(int __dim, const float *__t);
double round(double __a);
float roundf(float __a);
double rsqrt(double __a);
float rsqrtf(float __a);
double scalbn(double __a, int __b);
float scalbnf(float __a, int __b);
double scalbln(double __a, long __b);
float scalblnf(float __a, long __b);
double sin(double __a);
void sincos(double __a, double *__s, double *__c);
void sincosf(float __a, float *__s, float *__c);
void sincospi(double __a, double *__s, double *__c);
void sincospif(float __a, float *__s, float *__c);
float sinf(float __a);
double sinh(double __a);
float sinhf(float __a);
double sinpi(double __a);
float sinpif(float __a);
double sqrt(double __a);
float sqrtf(float __a);
double tan(double __a);
float tanf(float __a);
double tanh(double __a);
float tanhf(float __a);
double tgamma(double __a);
float tgammaf(float __a);
double trunc(double __a);
float truncf(float __a);
unsigned long long ullmax(unsigned long long __a,
unsigned long long __b);
unsigned long long ullmin(unsigned long long __a,
unsigned long long __b);
unsigned int umax(unsigned int __a, unsigned int __b);
unsigned int umin(unsigned int __a, unsigned int __b);
double y0(double __a);
float y0f(float __a);
double y1(double __a);
float y1f(float __a);
double yn(int __a, double __b);
float ynf(int __a, float __b);
/**
* A positive float constant expression. HUGE_VALF evaluates
* to +infinity. Used as an error value returned by the built-in
* math functions.
*/
#define HUGE_VALF (__builtin_huge_valf())
/**
* A positive double constant expression. HUGE_VAL evaluates
* to +infinity. Used as an error value returned by the built-in
* math functions.
*/
#define HUGE_VAL (__builtin_huge_val())
#ifdef __cplusplus
#include <cmath>
#endif