31 #if !(HAVE_COPYSIGN && HAVE_HYPOT && HAVE_ISFINITE && HAVE_ISINF && HAVE_ISNAN)
36 #if HAVE_MIPSFPU && HAVE_INLINE_ASM
42 #define atanf(x) ((float)atan(x))
47 #define atan2f(y, x) ((float)atan2(y, x))
52 #define powf(x, y) ((float)pow(x, y))
58 return x < 0 ? -pow(-x, 1.0 / 3.0) : pow(x, 1.0 / 3.0);
65 return x < 0 ? -
powf(-x, 1.0 / 3.0) :
powf(x, 1.0 / 3.0);
74 return av_int2double((vx & UINT64_C(0x7fffffffffffffff)) | (vy & UINT64_C(0x8000000000000000)));
80 #define cosf(x) ((float)cos(x))
123 static inline double erf(
double z)
125 #ifndef FF_ARRAY_ELEMS
126 #define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
138 return z * 1.125 + z * 0.003379167095512573896158903121545171688;
145 static const double y = 1.044948577880859375;
146 static const double p[] = {
147 0.0834305892146531832907,
148 -0.338165134459360935041,
149 -0.0509990735146777432841,
150 -0.00772758345802133288487,
151 -0.000322780120964605683831,
153 static const double q[] = {
155 0.455004033050794024546,
156 0.0875222600142252549554,
157 0.00858571925074406212772,
158 0.000370900071787748000569,
169 static const double y = 0.405935764312744140625;
170 static const double p[] = {
171 -0.098090592216281240205,
172 0.178114665841120341155,
173 0.191003695796775433986,
174 0.0888900368967884466578,
175 0.0195049001251218801359,
176 0.00180424538297014223957,
178 static const double q[] = {
180 1.84759070983002217845,
181 1.42628004845511324508,
182 0.578052804889902404909,
183 0.12385097467900864233,
184 0.0113385233577001411017,
185 0.337511472483094676155e-5,
196 static const double y = 0.50672817230224609375;
197 static const double p[] = {
198 -0.0243500476207698441272,
199 0.0386540375035707201728,
200 0.04394818964209516296,
201 0.0175679436311802092299,
202 0.00323962406290842133584,
203 0.000235839115596880717416,
205 static const double q[] = {
207 1.53991494948552447182,
208 0.982403709157920235114,
209 0.325732924782444448493,
210 0.0563921837420478160373,
211 0.00410369723978904575884,
222 static const double y = 0.5405750274658203125;
223 static const double p[] = {
224 0.00295276716530971662634,
225 0.0137384425896355332126,
226 0.00840807615555585383007,
227 0.00212825620914618649141,
228 0.000250269961544794627958,
229 0.113212406648847561139e-4,
231 static const double q[] = {
233 1.04217814166938418171,
234 0.442597659481563127003,
235 0.0958492726301061423444,
236 0.0105982906484876531489,
237 0.000479411269521714493907,
251 static const double y = 0.5579090118408203125;
252 static const double p[] = {
253 0.00628057170626964891937,
254 0.0175389834052493308818,
255 -0.212652252872804219852,
256 -0.687717681153649930619,
257 -2.5518551727311523996,
258 -3.22729451764143718517,
259 -2.8175401114513378771,
261 static const double q[] = {
263 2.79257750980575282228,
264 11.0567237927800161565,
265 15.930646027911794143,
266 22.9367376522880577224,
267 13.5064170191802889145,
268 5.48409182238641741584,
285 #define expf(x) ((float)exp(x))
290 #define exp2(x) exp((x) * M_LN2)
295 #define exp2f(x) ((float)exp2(x))
306 if ((v & 0x7f800000) != 0x7f800000)
308 return !(v & 0x007fffff);
314 if ((v & 0x7ff0000000000000) != 0x7ff0000000000000)
316 return !(v & 0x000fffffffffffff);
320 (sizeof(x) == sizeof(float) \
329 if ((v & 0x7f800000) != 0x7f800000)
331 return v & 0x007fffff;
337 if ((v & 0x7ff0000000000000) != 0x7ff0000000000000)
339 return (v & 0x000fffffffffffff) && 1;
343 (sizeof(x) == sizeof(float) \
352 return (v & 0x7f800000) != 0x7f800000;
358 return (v & 0x7ff0000000000000) != 0x7ff0000000000000;
361 #define isfinite(x) \
362 (sizeof(x) == sizeof(float) \
363 ? avpriv_isfinitef(x) \
364 : avpriv_isfinite(x))
376 if (x == 0 || y == 0)
385 return x*sqrt(1 + y*y);
391 #define ldexpf(x, exp) ((float)ldexp(x, exp))
396 #define llrint(x) ((long long)rint(x))
401 #define llrintf(x) ((long long)rint(x))
406 #define log2(x) (log(x) * 1.44269504088896340736)
411 #define log2f(x) ((float)log2(x))
416 #define log10f(x) ((float)log10(x))
421 #define sinf(x) ((float)sin(x))
425 static inline double rint(
double x)
427 return x >= 0 ?
floor(x + 0.5) :
ceil(x - 0.5);
441 return (
int)(
rint(x));
448 return (x > 0) ?
floor(x + 0.5) :
ceil(x - 0.5);
455 return (x > 0) ?
floor(x + 0.5) :
ceil(x - 0.5);