34 #if HAVE_MIPSFPU && HAVE_INLINE_ASM 40 #define atanf(x) ((float)atan(x)) 45 #define atan2f(y, x) ((float)atan2(y, x)) 50 #define powf(x, y) ((float)pow(x, y)) 56 return x < 0 ? -pow(-x, 1.0 / 3.0) : pow(x, 1.0 / 3.0);
63 return x < 0 ? -
powf(-x, 1.0 / 3.0) :
powf(x, 1.0 / 3.0);
72 return av_int2double((vx & UINT64_C(0x7fffffffffffffff)) | (vy & UINT64_C(0x8000000000000000)));
78 #define cosf(x) ((float)cos(x)) 83 double sum = coeff[size-1];
85 for (i = size-2; i >= 0; --i) {
121 static inline double erf(
double z)
123 #ifndef FF_ARRAY_ELEMS 124 #define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0])) 136 return z * 1.125 + z * 0.003379167095512573896158903121545171688;
143 static const double y = 1.044948577880859375;
144 static const double p[] = {
145 0.0834305892146531832907,
146 -0.338165134459360935041,
147 -0.0509990735146777432841,
148 -0.00772758345802133288487,
149 -0.000322780120964605683831,
151 static const double q[] = {
153 0.455004033050794024546,
154 0.0875222600142252549554,
155 0.00858571925074406212772,
156 0.000370900071787748000569,
167 static const double y = 0.405935764312744140625;
168 static const double p[] = {
169 -0.098090592216281240205,
170 0.178114665841120341155,
171 0.191003695796775433986,
172 0.0888900368967884466578,
173 0.0195049001251218801359,
174 0.00180424538297014223957,
176 static const double q[] = {
178 1.84759070983002217845,
179 1.42628004845511324508,
180 0.578052804889902404909,
181 0.12385097467900864233,
182 0.0113385233577001411017,
183 0.337511472483094676155e-5,
186 result *=
exp(-z * z) / z;
194 static const double y = 0.50672817230224609375;
195 static const double p[] = {
196 -0.0243500476207698441272,
197 0.0386540375035707201728,
198 0.04394818964209516296,
199 0.0175679436311802092299,
200 0.00323962406290842133584,
201 0.000235839115596880717416,
203 static const double q[] = {
205 1.53991494948552447182,
206 0.982403709157920235114,
207 0.325732924782444448493,
208 0.0563921837420478160373,
209 0.00410369723978904575884,
212 result *=
exp(-z * z) / z;
220 static const double y = 0.5405750274658203125;
221 static const double p[] = {
222 0.00295276716530971662634,
223 0.0137384425896355332126,
224 0.00840807615555585383007,
225 0.00212825620914618649141,
226 0.000250269961544794627958,
227 0.113212406648847561139e-4,
229 static const double q[] = {
231 1.04217814166938418171,
232 0.442597659481563127003,
233 0.0958492726301061423444,
234 0.0105982906484876531489,
235 0.000479411269521714493907,
238 result *=
exp(-z * z) / z;
249 static const double y = 0.5579090118408203125;
250 static const double p[] = {
251 0.00628057170626964891937,
252 0.0175389834052493308818,
253 -0.212652252872804219852,
254 -0.687717681153649930619,
255 -2.5518551727311523996,
256 -3.22729451764143718517,
257 -2.8175401114513378771,
259 static const double q[] = {
261 2.79257750980575282228,
262 11.0567237927800161565,
263 15.930646027911794143,
264 22.9367376522880577224,
265 13.5064170191802889145,
266 5.48409182238641741584,
269 result *=
exp(-z * z) / z;
283 #define expf(x) ((float)exp(x)) 288 #define exp2(x) exp((x) * M_LN2) 293 #define exp2f(x) ((float)exp2(x)) 304 if ((v & 0x7f800000) != 0x7f800000)
306 return !(v & 0x007fffff);
312 if ((v & 0x7ff0000000000000) != 0x7ff0000000000000)
314 return !(v & 0x000fffffffffffff);
318 (sizeof(x) == sizeof(float) \ 327 if ((v & 0x7f800000) != 0x7f800000)
329 return v & 0x007fffff;
335 if ((v & 0x7ff0000000000000) != 0x7ff0000000000000)
337 return (v & 0x000fffffffffffff) && 1;
341 (sizeof(x) == sizeof(float) \ 350 return (v & 0x7f800000) != 0x7f800000;
356 return (v & 0x7ff0000000000000) != 0x7ff0000000000000;
359 #define isfinite(x) \ 360 (sizeof(x) == sizeof(float) \ 361 ? avpriv_isfinitef(x) \ 362 : avpriv_isfinite(x)) 374 if (x == 0 || y == 0)
383 return x*sqrt(1 + y*y);
389 #define ldexpf(x, exp) ((float)ldexp(x, exp)) 394 #define llrint(x) ((long long)rint(x)) 399 #define llrintf(x) ((long long)rint(x)) 404 #define log2(x) (log(x) * 1.44269504088896340736) 409 #define log2f(x) ((float)log2(x)) 414 #define log10f(x) ((float)log10(x)) 419 #define sinf(x) ((float)sin(x)) 423 static inline double rint(
double x)
425 return x >= 0 ? floor(x + 0.5) : ceil(x - 0.5);
439 return (
int)(
rint(x));
446 return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5);
453 return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5);
460 return (x > 0) ? floor(x) : ceil(x);
467 return (x > 0) ? floor(x) : ceil(x);
static double rint(double x)
static double erf(double z)
erf function Algorithm taken from the Boost project, source: http://www.boost.org/doc/libs/1_46_1/boo...
#define FF_ARRAY_ELEMS(a)
static av_always_inline av_const int avpriv_isnanf(float x)
static av_always_inline uint64_t av_double2int(double f)
Reinterpret a double as a 64-bit integer.
Macro definitions for various function/variable attributes.
static double ff_eval_poly(const double *coeff, int size, double x)
static av_always_inline double av_int2double(uint64_t i)
Reinterpret a 64-bit integer as a double.
static av_always_inline av_const int avpriv_isinff(float x)
static av_always_inline av_const int avpriv_isfinitef(float x)
static av_always_inline double cbrt(double x)
static av_always_inline av_const int avpriv_isinf(double x)
static av_always_inline av_const double round(double x)
static av_always_inline av_const int avpriv_isfinite(double x)
static av_const double hypot(double x, double y)
static av_always_inline av_const double trunc(double x)
static av_always_inline av_const long int lrintf(float x)
static av_always_inline av_const float truncf(float x)
static av_always_inline float cbrtf(float x)
static av_always_inline av_const long int lrint(double x)
static av_always_inline double copysign(double x, double y)
static av_always_inline av_const int avpriv_isnan(double x)
static av_always_inline uint32_t av_float2int(float f)
Reinterpret a float as a 32-bit integer.
static av_always_inline av_const float roundf(float x)
MIPS optimization for some libm functions.
static const double coeff[2][5]