libm: Add fallback definition for cbrt() using pow()

The function is known to be missing in at least one target (MSVC).

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
James Almer 2013-01-22 04:10:21 -03:00 committed by Michael Niedermayer
parent 26345acb0e
commit e65d8509f0
2 changed files with 8 additions and 0 deletions

1
configure vendored
View File

@ -1300,6 +1300,7 @@ HAVE_LIST_PUB='
MATH_FUNCS="
atanf
atan2f
cbrt
cbrtf
cosf
exp2

View File

@ -48,6 +48,13 @@
#define powf(x, y) ((float)pow(x, y))
#endif
#if !HAVE_CBRT
static av_always_inline double cbrt(double x)
{
return x < 0 ? -pow(-x, 1.0 / 3.0) : pow(x, 1.0 / 3.0);
}
#endif
#if !HAVE_CBRTF
static av_always_inline float cbrtf(float x)
{