msvcr120: Add expm1.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alex Henrie 2017-07-13 23:14:20 -06:00 committed by Alexandre Julliard
parent 26163f5cdf
commit 79715cce88
8 changed files with 58 additions and 12 deletions

2
configure vendored
View File

@ -17421,6 +17421,8 @@ for ac_func in \
erff \ erff \
exp2 \ exp2 \
exp2f \ exp2f \
expm1 \
expm1f \
lgamma \ lgamma \
lgammaf \ lgammaf \
llrint \ llrint \

View File

@ -2608,6 +2608,8 @@ AC_CHECK_FUNCS(\
erff \ erff \
exp2 \ exp2 \
exp2f \ exp2f \
expm1 \
expm1f \
lgamma \ lgamma \
lgammaf \ lgammaf \
llrint \ llrint \

View File

@ -231,9 +231,9 @@
@ cdecl exp2f(float) ucrtbase.exp2f @ cdecl exp2f(float) ucrtbase.exp2f
@ cdecl exp2l(double) ucrtbase.exp2l @ cdecl exp2l(double) ucrtbase.exp2l
@ cdecl -arch=arm,x86_64 expf(float) ucrtbase.expf @ cdecl -arch=arm,x86_64 expf(float) ucrtbase.expf
@ stub expm1 @ cdecl expm1(double) ucrtbase.expm1
@ stub expm1f @ cdecl expm1f(float) ucrtbase.expm1f
@ stub expm1l @ cdecl expm1l(double) ucrtbase.expm1l
@ cdecl fabs(double) ucrtbase.fabs @ cdecl fabs(double) ucrtbase.fabs
@ cdecl -arch=arm fabsf(float) ucrtbase.fabsf @ cdecl -arch=arm fabsf(float) ucrtbase.fabsf
@ stub fdim @ stub fdim

View File

@ -2134,9 +2134,9 @@
@ cdecl exp2f(float) MSVCR120_exp2f @ cdecl exp2f(float) MSVCR120_exp2f
@ cdecl exp2l(double) MSVCR120_exp2l @ cdecl exp2l(double) MSVCR120_exp2l
@ cdecl -arch=arm,x86_64 expf(float) MSVCRT_expf @ cdecl -arch=arm,x86_64 expf(float) MSVCRT_expf
@ stub expm1 @ cdecl expm1(double) MSVCR120_expm1
@ stub expm1f @ cdecl expm1f(float) MSVCR120_expm1f
@ stub expm1l @ cdecl expm1l(double) MSVCR120_expm1l
@ cdecl fabs(double) MSVCRT_fabs @ cdecl fabs(double) MSVCRT_fabs
@ cdecl -arch=arm,x86_64 fabsf(float) MSVCRT_fabsf @ cdecl -arch=arm,x86_64 fabsf(float) MSVCRT_fabsf
@ cdecl fclose(ptr) MSVCRT_fclose @ cdecl fclose(ptr) MSVCRT_fclose

View File

@ -1800,9 +1800,9 @@
@ cdecl exp2f(float) msvcr120.exp2f @ cdecl exp2f(float) msvcr120.exp2f
@ cdecl exp2l(double) msvcr120.exp2l @ cdecl exp2l(double) msvcr120.exp2l
@ cdecl -arch=arm,x86_64 expf(float) msvcr120.expf @ cdecl -arch=arm,x86_64 expf(float) msvcr120.expf
@ stub expm1 @ cdecl expm1(double) msvcr120.expm1
@ stub expm1f @ cdecl expm1f(float) msvcr120.expm1f
@ stub expm1l @ cdecl expm1l(double) msvcr120.expm1l
@ cdecl fabs(double) msvcr120.fabs @ cdecl fabs(double) msvcr120.fabs
@ cdecl -arch=arm,x86_64 fabsf(float) msvcr120.fabsf @ cdecl -arch=arm,x86_64 fabsf(float) msvcr120.fabsf
@ cdecl fclose(ptr) msvcr120.fclose @ cdecl fclose(ptr) msvcr120.fclose

View File

@ -2411,6 +2411,42 @@ LDOUBLE CDECL MSVCR120_exp2l(LDOUBLE x)
return MSVCR120_exp2(x); return MSVCR120_exp2(x);
} }
/*********************************************************************
* expm1 (MSVCR120.@)
*/
double CDECL MSVCR120_expm1(double x)
{
#ifdef HAVE_EXPM1
double ret = expm1(x);
#else
double ret = exp(x) - 1;
#endif
if (!isfinite(ret)) *MSVCRT__errno() = MSVCRT_ERANGE;
return ret;
}
/*********************************************************************
* expm1f (MSVCR120.@)
*/
float CDECL MSVCR120_expm1f(float x)
{
#ifdef HAVE_EXPM1F
double ret = expm1f(x);
#else
double ret = exp(x) - 1;
#endif
if (!isfinite(ret)) *MSVCRT__errno() = MSVCRT_ERANGE;
return ret;
}
/*********************************************************************
* expm1l (MSVCR120.@)
*/
LDOUBLE CDECL MSVCR120_expm1l(LDOUBLE x)
{
return MSVCR120_expm1(x);
}
/********************************************************************* /*********************************************************************
* log2 (MSVCR120.@) * log2 (MSVCR120.@)
*/ */

View File

@ -2277,9 +2277,9 @@
@ cdecl exp2f(float) MSVCR120_exp2f @ cdecl exp2f(float) MSVCR120_exp2f
@ cdecl exp2l(double) MSVCR120_exp2l @ cdecl exp2l(double) MSVCR120_exp2l
@ cdecl -arch=arm,x86_64 expf(float) MSVCRT_expf @ cdecl -arch=arm,x86_64 expf(float) MSVCRT_expf
@ stub expm1 @ cdecl expm1(double) MSVCR120_expm1
@ stub expm1f @ cdecl expm1f(float) MSVCR120_expm1f
@ stub expm1l @ cdecl expm1l(double) MSVCR120_expm1l
@ cdecl fabs(double) MSVCRT_fabs @ cdecl fabs(double) MSVCRT_fabs
@ cdecl -arch=arm fabsf(float) MSVCRT_fabsf @ cdecl -arch=arm fabsf(float) MSVCRT_fabsf
@ cdecl fclose(ptr) MSVCRT_fclose @ cdecl fclose(ptr) MSVCRT_fclose

View File

@ -156,6 +156,12 @@
/* Define to 1 if you have the `exp2f' function. */ /* Define to 1 if you have the `exp2f' function. */
#undef HAVE_EXP2F #undef HAVE_EXP2F
/* Define to 1 if you have the `expm1' function. */
#undef HAVE_EXPM1
/* Define to 1 if you have the `expm1f' function. */
#undef HAVE_EXPM1F
/* Define to 1 if you have the `fallocate' function. */ /* Define to 1 if you have the `fallocate' function. */
#undef HAVE_FALLOCATE #undef HAVE_FALLOCATE