msvcr120: Add atanh.
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:
parent
f1dad14807
commit
860c1578e6
|
@ -17410,6 +17410,8 @@ for ac_func in \
|
|||
acoshf \
|
||||
asinh \
|
||||
asinhf \
|
||||
atanh \
|
||||
atanhf \
|
||||
cbrt \
|
||||
cbrtf \
|
||||
erf \
|
||||
|
|
|
@ -2598,6 +2598,8 @@ AC_CHECK_FUNCS(\
|
|||
acoshf \
|
||||
asinh \
|
||||
asinhf \
|
||||
atanh \
|
||||
atanhf \
|
||||
cbrt \
|
||||
cbrtf \
|
||||
erf \
|
||||
|
|
|
@ -136,9 +136,9 @@
|
|||
@ cdecl atan2(double double) ucrtbase.atan2
|
||||
@ cdecl -arch=arm,x86_64 atan2f(float float) ucrtbase.atan2f
|
||||
@ cdecl -arch=arm,x86_64 atanf(float) ucrtbase.atanf
|
||||
@ stub atanh
|
||||
@ stub atanhf
|
||||
@ stub atanhl
|
||||
@ cdecl atanh(double) ucrtbase.atanh
|
||||
@ cdecl atanhf(float) ucrtbase.atanhf
|
||||
@ cdecl atanhl(double) ucrtbase.atanhl
|
||||
@ stub cabs
|
||||
@ stub cabsf
|
||||
@ stub cabsl
|
||||
|
|
|
@ -2025,9 +2025,9 @@
|
|||
@ cdecl -arch=arm,x86_64 atanf(float) MSVCRT_atanf
|
||||
@ cdecl atan2(double double) MSVCRT_atan2
|
||||
@ cdecl -arch=arm,x86_64 atan2f(float float) MSVCRT_atan2f
|
||||
@ stub atanh
|
||||
@ stub atanhf
|
||||
@ stub atanhl
|
||||
@ cdecl atanh(double) MSVCR120_atanh
|
||||
@ cdecl atanhf(float) MSVCR120_atanhf
|
||||
@ cdecl atanhl(double) MSVCR120_atanhl
|
||||
@ cdecl -private atexit(ptr) MSVCRT_atexit # not imported to avoid conflicts with Mingw
|
||||
@ cdecl atof(str) MSVCRT_atof
|
||||
@ cdecl atoi(str) MSVCRT_atoi
|
||||
|
|
|
@ -1691,9 +1691,9 @@
|
|||
@ cdecl -arch=arm,x86_64 atanf(float) msvcr120.atanf
|
||||
@ cdecl atan2(double double) msvcr120.atan2
|
||||
@ cdecl -arch=arm,x86_64 atan2f(float float) msvcr120.atan2f
|
||||
@ stub atanh
|
||||
@ stub atanhf
|
||||
@ stub atanhl
|
||||
@ cdecl atanh(double) msvcr120.atanh
|
||||
@ cdecl atanhf(float) msvcr120.atanhf
|
||||
@ cdecl atanhl(double) msvcr120.atanhl
|
||||
@ cdecl -private atexit(ptr) msvcr120.atexit
|
||||
@ cdecl atof(str) msvcr120.atof
|
||||
@ cdecl atoi(str) msvcr120.atoi
|
||||
|
|
|
@ -2943,6 +2943,72 @@ LDOUBLE CDECL MSVCR120_acoshl(LDOUBLE x)
|
|||
return MSVCR120_acosh(x);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* atanh (MSVCR120.@)
|
||||
*/
|
||||
double CDECL MSVCR120_atanh(double x)
|
||||
{
|
||||
double ret;
|
||||
|
||||
if (x > 1 || x < -1) {
|
||||
MSVCRT_fenv_t env;
|
||||
|
||||
*MSVCRT__errno() = MSVCRT_EDOM;
|
||||
|
||||
/* on Linux atanh returns -NAN in this case */
|
||||
MSVCRT_fegetenv(&env);
|
||||
env.status |= MSVCRT__SW_INVALID;
|
||||
MSVCRT_fesetenv(&env);
|
||||
return NAN;
|
||||
}
|
||||
|
||||
#ifdef HAVE_ATANH
|
||||
ret = atanh(x);
|
||||
#else
|
||||
if (-1e-6 < x && x < 1e-6) ret = x + x*x*x/3;
|
||||
else ret = (log(1+x) - log(1-x)) / 2;
|
||||
#endif
|
||||
|
||||
if (!isfinite(ret)) *MSVCRT__errno() = MSVCRT_ERANGE;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* atanhf (MSVCR120.@)
|
||||
*/
|
||||
float CDECL MSVCR120_atanhf(float x)
|
||||
{
|
||||
#ifdef HAVE_ATANHF
|
||||
double ret;
|
||||
|
||||
if (x > 1 || x < -1) {
|
||||
MSVCRT_fenv_t env;
|
||||
|
||||
*MSVCRT__errno() = MSVCRT_EDOM;
|
||||
|
||||
MSVCRT_fegetenv(&env);
|
||||
env.status |= MSVCRT__SW_INVALID;
|
||||
MSVCRT_fesetenv(&env);
|
||||
return NAN;
|
||||
}
|
||||
|
||||
ret = atanhf(x);
|
||||
|
||||
if (!isfinite(ret)) *MSVCRT__errno() = MSVCRT_ERANGE;
|
||||
return ret;
|
||||
#else
|
||||
return MSVCR120_atanh(x);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* atanhl (MSVCR120.@)
|
||||
*/
|
||||
LDOUBLE CDECL MSVCR120_atanhl(LDOUBLE x)
|
||||
{
|
||||
return MSVCR120_atanh(x);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _scalb (MSVCRT.@)
|
||||
* scalbn (MSVCR120.@)
|
||||
|
|
|
@ -2167,9 +2167,9 @@
|
|||
@ cdecl atan2(double double) MSVCRT_atan2
|
||||
@ cdecl -arch=arm,x86_64 atan2f(float float) MSVCRT_atan2f
|
||||
@ cdecl -arch=arm,x86_64 atanf(float) MSVCRT_atanf
|
||||
@ stub atanh
|
||||
@ stub atanhf
|
||||
@ stub atanhl
|
||||
@ cdecl atanh(double) MSVCR120_atanh
|
||||
@ cdecl atanhf(float) MSVCR120_atanhf
|
||||
@ cdecl atanhl(double) MSVCR120_atanhl
|
||||
@ cdecl atof(str) MSVCRT_atof
|
||||
@ cdecl atoi(str) MSVCRT_atoi
|
||||
@ cdecl atol(str) ntdll.atol
|
||||
|
|
|
@ -50,6 +50,12 @@
|
|||
/* Define to 1 if you have the <asm/user.h> header file. */
|
||||
#undef HAVE_ASM_USER_H
|
||||
|
||||
/* Define to 1 if you have the `atanh' function. */
|
||||
#undef HAVE_ATANH
|
||||
|
||||
/* Define to 1 if you have the `atanhf' function. */
|
||||
#undef HAVE_ATANHF
|
||||
|
||||
/* Define to 1 if you have the <AudioToolbox/AudioConverter.h> header file. */
|
||||
#undef HAVE_AUDIOTOOLBOX_AUDIOCONVERTER_H
|
||||
|
||||
|
|
Loading…
Reference in New Issue