msvcrt: Implement the tgamma functions.
Signed-off-by: Martin Storsjo <martin@martin.st> Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
83a95b8fcf
commit
e38b46e7f7
|
@ -19289,6 +19289,8 @@ for ac_func in \
|
||||||
rintf \
|
rintf \
|
||||||
round \
|
round \
|
||||||
roundf \
|
roundf \
|
||||||
|
tgamma \
|
||||||
|
tgammaf \
|
||||||
trunc \
|
trunc \
|
||||||
truncf \
|
truncf \
|
||||||
y0 \
|
y0 \
|
||||||
|
|
|
@ -2676,6 +2676,8 @@ AC_CHECK_FUNCS(\
|
||||||
rintf \
|
rintf \
|
||||||
round \
|
round \
|
||||||
roundf \
|
roundf \
|
||||||
|
tgamma \
|
||||||
|
tgammaf \
|
||||||
trunc \
|
trunc \
|
||||||
truncf \
|
truncf \
|
||||||
y0 \
|
y0 \
|
||||||
|
|
|
@ -333,9 +333,9 @@
|
||||||
@ cdecl -arch=arm,x86_64,arm64 tanf(float) ucrtbase.tanf
|
@ cdecl -arch=arm,x86_64,arm64 tanf(float) ucrtbase.tanf
|
||||||
@ cdecl tanh(double) ucrtbase.tanh
|
@ cdecl tanh(double) ucrtbase.tanh
|
||||||
@ cdecl -arch=arm,x86_64,arm64 tanhf(float) ucrtbase.tanhf
|
@ cdecl -arch=arm,x86_64,arm64 tanhf(float) ucrtbase.tanhf
|
||||||
@ stub tgamma
|
@ cdecl tgamma(double) ucrtbase.tgamma
|
||||||
@ stub tgammaf
|
@ cdecl tgammaf(float) ucrtbase.tgammaf
|
||||||
@ stub tgammal
|
@ cdecl tgammal(double) ucrtbase.tgammal
|
||||||
@ cdecl trunc(double) ucrtbase.trunc
|
@ cdecl trunc(double) ucrtbase.trunc
|
||||||
@ cdecl truncf(float) ucrtbase.truncf
|
@ cdecl truncf(float) ucrtbase.truncf
|
||||||
@ cdecl truncl(double) ucrtbase.truncl
|
@ cdecl truncl(double) ucrtbase.truncl
|
||||||
|
|
|
@ -2405,9 +2405,9 @@
|
||||||
@ cdecl -arch=arm,x86_64,arm64 tanf(float) MSVCRT_tanf
|
@ cdecl -arch=arm,x86_64,arm64 tanf(float) MSVCRT_tanf
|
||||||
@ cdecl tanh(double) MSVCRT_tanh
|
@ cdecl tanh(double) MSVCRT_tanh
|
||||||
@ cdecl -arch=arm,x86_64,arm64 tanhf(float) MSVCRT_tanhf
|
@ cdecl -arch=arm,x86_64,arm64 tanhf(float) MSVCRT_tanhf
|
||||||
@ stub tgamma
|
@ cdecl tgamma(double) MSVCR120_tgamma
|
||||||
@ stub tgammaf
|
@ cdecl tgammaf(float) MSVCR120_tgammaf
|
||||||
@ stub tgammal
|
@ cdecl tgammal(double) MSVCR120_tgamma
|
||||||
@ cdecl tmpfile() MSVCRT_tmpfile
|
@ cdecl tmpfile() MSVCRT_tmpfile
|
||||||
@ cdecl tmpfile_s(ptr) MSVCRT_tmpfile_s
|
@ cdecl tmpfile_s(ptr) MSVCRT_tmpfile_s
|
||||||
@ cdecl tmpnam(ptr) MSVCRT_tmpnam
|
@ cdecl tmpnam(ptr) MSVCRT_tmpnam
|
||||||
|
|
|
@ -2067,9 +2067,9 @@
|
||||||
@ cdecl -arch=arm,x86_64,arm64 tanf(float) msvcr120.tanf
|
@ cdecl -arch=arm,x86_64,arm64 tanf(float) msvcr120.tanf
|
||||||
@ cdecl tanh(double) msvcr120.tanh
|
@ cdecl tanh(double) msvcr120.tanh
|
||||||
@ cdecl -arch=arm,x86_64,arm64 tanhf(float) msvcr120.tanhf
|
@ cdecl -arch=arm,x86_64,arm64 tanhf(float) msvcr120.tanhf
|
||||||
@ stub tgamma
|
@ cdecl tgamma(double) msvcr120.tgamma
|
||||||
@ stub tgammaf
|
@ cdecl tgammaf(float) msvcr120.tgammaf
|
||||||
@ stub tgammal
|
@ cdecl tgammal(double) msvcr120.tgammal
|
||||||
@ cdecl tmpfile() msvcr120.tmpfile
|
@ cdecl tmpfile() msvcr120.tmpfile
|
||||||
@ cdecl tmpfile_s(ptr) msvcr120.tmpfile_s
|
@ cdecl tmpfile_s(ptr) msvcr120.tmpfile_s
|
||||||
@ cdecl tmpnam(ptr) msvcr120.tmpnam
|
@ cdecl tmpnam(ptr) msvcr120.tmpnam
|
||||||
|
|
|
@ -3404,6 +3404,44 @@ LDOUBLE CDECL MSVCR120_lgammal(LDOUBLE x)
|
||||||
return MSVCR120_lgamma(x);
|
return MSVCR120_lgamma(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
* tgamma (MSVCR120.@)
|
||||||
|
*/
|
||||||
|
double CDECL MSVCR120_tgamma(double x)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_TGAMMA
|
||||||
|
if(x==0.0) *MSVCRT__errno() = MSVCRT_ERANGE;
|
||||||
|
if(x<0.0f) {
|
||||||
|
double integral;
|
||||||
|
if (modf(x, &integral) == 0)
|
||||||
|
*MSVCRT__errno() = MSVCRT_EDOM;
|
||||||
|
}
|
||||||
|
return tgamma(x);
|
||||||
|
#else
|
||||||
|
FIXME( "not implemented\n" );
|
||||||
|
return 0.0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
* tgammaf (MSVCR120.@)
|
||||||
|
*/
|
||||||
|
float CDECL MSVCR120_tgammaf(float x)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_TGAMMAF
|
||||||
|
if(x==0.0f) *MSVCRT__errno() = MSVCRT_ERANGE;
|
||||||
|
if(x<0.0f) {
|
||||||
|
float integral;
|
||||||
|
if (modff(x, &integral) == 0)
|
||||||
|
*MSVCRT__errno() = MSVCRT_EDOM;
|
||||||
|
}
|
||||||
|
return tgammaf(x);
|
||||||
|
#else
|
||||||
|
FIXME( "not implemented\n" );
|
||||||
|
return 0.0f;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
* nan (MSVCR120.@)
|
* nan (MSVCR120.@)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2534,9 +2534,9 @@
|
||||||
@ cdecl tanh(double) MSVCRT_tanh
|
@ cdecl tanh(double) MSVCRT_tanh
|
||||||
@ cdecl -arch=arm,x86_64,arm64 tanhf(float) MSVCRT_tanhf
|
@ cdecl -arch=arm,x86_64,arm64 tanhf(float) MSVCRT_tanhf
|
||||||
@ cdecl terminate() MSVCRT_terminate
|
@ cdecl terminate() MSVCRT_terminate
|
||||||
@ stub tgamma
|
@ cdecl tgamma(double) MSVCR120_tgamma
|
||||||
@ stub tgammaf
|
@ cdecl tgammaf(float) MSVCR120_tgammaf
|
||||||
@ stub tgammal
|
@ cdecl tgammal(double) MSVCR120_tgamma
|
||||||
@ cdecl tmpfile() MSVCRT_tmpfile
|
@ cdecl tmpfile() MSVCRT_tmpfile
|
||||||
@ cdecl tmpfile_s(ptr) MSVCRT_tmpfile_s
|
@ cdecl tmpfile_s(ptr) MSVCRT_tmpfile_s
|
||||||
@ cdecl tmpnam(ptr) MSVCRT_tmpnam
|
@ cdecl tmpnam(ptr) MSVCRT_tmpnam
|
||||||
|
|
|
@ -1166,6 +1166,12 @@
|
||||||
/* Define to 1 if you have the <termios.h> header file. */
|
/* Define to 1 if you have the <termios.h> header file. */
|
||||||
#undef HAVE_TERMIOS_H
|
#undef HAVE_TERMIOS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `tgamma' function. */
|
||||||
|
#undef HAVE_TGAMMA
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `tgammaf' function. */
|
||||||
|
#undef HAVE_TGAMMAF
|
||||||
|
|
||||||
/* Define to 1 if you have the `thr_kill2' function. */
|
/* Define to 1 if you have the `thr_kill2' function. */
|
||||||
#undef HAVE_THR_KILL2
|
#undef HAVE_THR_KILL2
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue