msvcr120: Add log1p.

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-17 22:33:51 -06:00 committed by Alexandre Julliard
parent 548382e634
commit 31b835d0e0
8 changed files with 58 additions and 12 deletions

2
configure vendored
View File

@ -17429,6 +17429,8 @@ for ac_func in \
llrintf \ llrintf \
llround \ llround \
llroundf \ llroundf \
log1p \
log1pf \
log2 \ log2 \
log2f \ log2f \
lrint \ lrint \

View File

@ -2616,6 +2616,8 @@ AC_CHECK_FUNCS(\
llrintf \ llrintf \
llround \ llround \
llroundf \ llroundf \
log1p \
log1pf \
log2 \ log2 \
log2f \ log2f \
lrint \ lrint \

View File

@ -270,9 +270,9 @@
@ cdecl log(double) ucrtbase.log @ cdecl log(double) ucrtbase.log
@ cdecl log10(double) ucrtbase.log10 @ cdecl log10(double) ucrtbase.log10
@ cdecl -arch=arm,x86_64 log10f(float) ucrtbase.log10f @ cdecl -arch=arm,x86_64 log10f(float) ucrtbase.log10f
@ stub log1p @ cdecl log1p(double) ucrtbase.log1p
@ stub log1pf @ cdecl log1pf(float) ucrtbase.log1pf
@ stub log1pl @ cdecl log1pl(double) ucrtbase.log1pl
@ cdecl log2(double) ucrtbase.log2 @ cdecl log2(double) ucrtbase.log2
@ cdecl log2f(float) ucrtbase.log2f @ cdecl log2f(float) ucrtbase.log2f
@ cdecl log2l(double) ucrtbase.log2l @ cdecl log2l(double) ucrtbase.log2l

View File

@ -2259,9 +2259,9 @@
@ cdecl -arch=arm,x86_64 logf(float) MSVCRT_logf @ cdecl -arch=arm,x86_64 logf(float) MSVCRT_logf
@ cdecl log10(double) MSVCRT_log10 @ cdecl log10(double) MSVCRT_log10
@ cdecl -arch=arm,x86_64 log10f(float) MSVCRT_log10f @ cdecl -arch=arm,x86_64 log10f(float) MSVCRT_log10f
@ stub log1p @ cdecl log1p(double) MSVCR120_log1p
@ stub log1pf @ cdecl log1pf(float) MSVCR120_log1pf
@ stub log1pl @ cdecl log1pl(double) MSVCR120_log1pl
@ cdecl log2(double) MSVCR120_log2 @ cdecl log2(double) MSVCR120_log2
@ cdecl log2f(float) MSVCR120_log2f @ cdecl log2f(float) MSVCR120_log2f
@ cdecl log2l(double) MSVCR120_log2l @ cdecl log2l(double) MSVCR120_log2l

View File

@ -1922,9 +1922,9 @@
@ cdecl -arch=arm,x86_64 logf(float) msvcr120.logf @ cdecl -arch=arm,x86_64 logf(float) msvcr120.logf
@ cdecl log10(double) msvcr120.log10 @ cdecl log10(double) msvcr120.log10
@ cdecl -arch=arm,x86_64 log10f(float) msvcr120.log10f @ cdecl -arch=arm,x86_64 log10f(float) msvcr120.log10f
@ stub log1p @ cdecl log1p(double) msvcr120.log1p
@ stub log1pf @ cdecl log1pf(float) msvcr120.log1pf
@ stub log1pl @ cdecl log1pl(double) msvcr120.log1pl
@ cdecl log2(double) msvcr120.log2 @ cdecl log2(double) msvcr120.log2
@ cdecl log2f(float) msvcr120.log2f @ cdecl log2f(float) msvcr120.log2f
@ cdecl log2l(double) msvcr120.log2l @ cdecl log2l(double) msvcr120.log2l

View File

@ -2447,6 +2447,42 @@ LDOUBLE CDECL MSVCR120_expm1l(LDOUBLE x)
return MSVCR120_expm1(x); return MSVCR120_expm1(x);
} }
/*********************************************************************
* log1p (MSVCR120.@)
*/
double CDECL MSVCR120_log1p(double x)
{
if (x < -1) *MSVCRT__errno() = MSVCRT_EDOM;
else if (x == -1) *MSVCRT__errno() = MSVCRT_ERANGE;
#ifdef HAVE_LOG1P
return log1p(x);
#else
return log(1 + x);
#endif
}
/*********************************************************************
* log1pf (MSVCR120.@)
*/
float CDECL MSVCR120_log1pf(float x)
{
if (x < -1) *MSVCRT__errno() = MSVCRT_EDOM;
else if (x == -1) *MSVCRT__errno() = MSVCRT_ERANGE;
#ifdef HAVE_LOG1PF
return log1pf(x);
#else
return log(1 + x);
#endif
}
/*********************************************************************
* log1pl (MSVCR120.@)
*/
LDOUBLE CDECL MSVCR120_log1pl(LDOUBLE x)
{
return MSVCR120_log1p(x);
}
/********************************************************************* /*********************************************************************
* log2 (MSVCR120.@) * log2 (MSVCR120.@)
*/ */

View File

@ -2392,9 +2392,9 @@
@ cdecl log(double) MSVCRT_log @ cdecl log(double) MSVCRT_log
@ cdecl log10(double) MSVCRT_log10 @ cdecl log10(double) MSVCRT_log10
@ cdecl -arch=arm,x86_64 log10f(float) MSVCRT_log10f @ cdecl -arch=arm,x86_64 log10f(float) MSVCRT_log10f
@ stub log1p @ cdecl log1p(double) MSVCR120_log1p
@ stub log1pf @ cdecl log1pf(float) MSVCR120_log1pf
@ stub log1pl @ cdecl log1pl(double) MSVCR120_log1pl
@ cdecl log2(double) MSVCR120_log2 @ cdecl log2(double) MSVCR120_log2
@ cdecl log2f(float) MSVCR120_log2f @ cdecl log2f(float) MSVCR120_log2f
@ cdecl log2l(double) MSVCR120_log2l @ cdecl log2l(double) MSVCR120_log2l

View File

@ -522,6 +522,12 @@
/* Define to 1 if you have the `llroundf' function. */ /* Define to 1 if you have the `llroundf' function. */
#undef HAVE_LLROUNDF #undef HAVE_LLROUNDF
/* Define to 1 if you have the `log1p' function. */
#undef HAVE_LOG1P
/* Define to 1 if you have the `log1pf' function. */
#undef HAVE_LOG1PF
/* Define to 1 if you have the `log2' function. */ /* Define to 1 if you have the `log2' function. */
#undef HAVE_LOG2 #undef HAVE_LOG2