Piotr Caban : msvcp90: Added complex hyperbolic functions implementation.
Module: wine Branch: master Commit: b0cb2ead335dc024057f605f2297ce673e56420b URL: http://source.winehq.org/git/wine.git/?a=commit;h=b0cb2ead335dc024057f605f22... Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Jan 24 12:29:21 2013 +0100 msvcp90: Added complex hyperbolic functions implementation. --- dlls/msvcp90/math.c | 70 +++++++++++++++++++++++++++++++++++++++++++++ dlls/msvcp90/msvcp90.spec | 36 +++++++++++----------- 2 files changed, 88 insertions(+), 18 deletions(-) diff --git a/dlls/msvcp90/math.c b/dlls/msvcp90/math.c index c13fd3c..72a8922 100644 --- a/dlls/msvcp90/math.c +++ b/dlls/msvcp90/math.c @@ -1340,6 +1340,38 @@ complex_float* __cdecl complex_float_tan(complex_float *ret, const complex_float return ret; } +/* ??$cosh(a)M@std@@YA?AV?$complex(a)M@0(a)ABV10@@Z */ +/* ??$cosh(a)M@std@@YA?AV?$complex(a)M@0(a)AEBV10@@Z */ +complex_float* __cdecl complex_float_cosh(complex_float *ret, const complex_float *c) +{ + ret->real = cosh(c->real)*cos(c->imag); + ret->imag = sinh(c->real)*sin(c->imag); + return ret; +} + +/* ??$sinh(a)M@std@@YA?AV?$complex(a)M@0(a)ABV10@@Z */ +/* ??$sinh(a)M@std@@YA?AV?$complex(a)M@0(a)AEBV10@@Z */ +complex_float* __cdecl complex_float_sinh(complex_float *ret, const complex_float *c) +{ + ret->real = sinh(c->real)*cos(c->imag); + ret->imag = cosh(c->real)*sin(c->imag); + return ret; +} + +/* ??$tanh(a)M@std@@YA?AV?$complex(a)M@0(a)ABV10@@Z */ +/* ??$tanh(a)M@std@@YA?AV?$complex(a)M@0(a)AEBV10@@Z */ +complex_float* __cdecl complex_float_tanh(complex_float *ret, const complex_float *c) +{ + complex_float tmp; + + ret->real = -c->imag; + ret->imag = c->real; + complex_float_tan(&tmp, ret); + ret->real = tmp.imag; + ret->imag = -tmp.real; + return ret; +} + /* ??0?$_Complex_base(a)NU_C_double_complex@@@std@@QAE(a)ABN0@Z */ /* ??0?$_Complex_base(a)NU_C_double_complex@@@std@@QEAA(a)AEBN0@Z */ /* ??0?$_Complex_base(a)OU_C_ldouble_complex@@@std@@QAE(a)ABO0@Z */ @@ -1882,3 +1914,41 @@ complex_double* __cdecl complex_double_tan(complex_double *ret, const complex_do ret->imag = sinh(2*c->imag) / denom; return ret; } + +/* ??$cosh(a)N@std@@YA?AV?$complex(a)N@0(a)ABV10@@Z */ +/* ??$cosh(a)N@std@@YA?AV?$complex(a)N@0(a)AEBV10@@Z */ +/* ??$cosh(a)O@std@@YA?AV?$complex(a)O@0(a)ABV10@@Z */ +/* ??$cosh(a)O@std@@YA?AV?$complex(a)O@0(a)AEBV10@@Z */ +complex_double* __cdecl complex_double_cosh(complex_double *ret, const complex_double *c) +{ + ret->real = cosh(c->real)*cos(c->imag); + ret->imag = sinh(c->real)*sin(c->imag); + return ret; +} + +/* ??$sinh(a)N@std@@YA?AV?$complex(a)N@0(a)ABV10@@Z */ +/* ??$sinh(a)N@std@@YA?AV?$complex(a)N@0(a)AEBV10@@Z */ +/* ??$sinh(a)O@std@@YA?AV?$complex(a)O@0(a)ABV10@@Z */ +/* ??$sinh(a)O@std@@YA?AV?$complex(a)O@0(a)AEBV10@@Z */ +complex_double* __cdecl complex_double_sinh(complex_double *ret, const complex_double *c) +{ + ret->real = sinh(c->real)*cos(c->imag); + ret->imag = cosh(c->real)*sin(c->imag); + return ret; +} + +/* ??$tanh(a)N@std@@YA?AV?$complex(a)N@0(a)ABV10@@Z */ +/* ??$tanh(a)N@std@@YA?AV?$complex(a)N@0(a)AEBV10@@Z */ +/* ??$tanh(a)O@std@@YA?AV?$complex(a)O@0(a)ABV10@@Z */ +/* ??$tanh(a)O@std@@YA?AV?$complex(a)O@0(a)AEBV10@@Z */ +complex_double* __cdecl complex_double_tanh(complex_double *ret, const complex_double *c) +{ + complex_double tmp; + + ret->real = -c->imag; + ret->imag = c->real; + complex_double_tan(&tmp, ret); + ret->real = tmp.imag; + ret->imag = -tmp.real; + return ret; +} diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index 3022505..b77fcf5 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -374,12 +374,12 @@ @ cdecl -arch=win64 ??$cos(a)N@std@@YA?AV?$complex(a)N@0(a)AEBV10@@Z(ptr ptr) complex_double_cos @ cdecl -arch=win32 ??$cos(a)O@std@@YA?AV?$complex(a)O@0(a)ABV10@@Z(ptr ptr) complex_double_cos @ cdecl -arch=win64 ??$cos(a)O@std@@YA?AV?$complex(a)O@0(a)AEBV10@@Z(ptr ptr) complex_double_cos -@ stub -arch=win32 ??$cosh(a)M@std@@YA?AV?$complex(a)M@0(a)ABV10@@Z -@ stub -arch=win64 ??$cosh(a)M@std@@YA?AV?$complex(a)M@0(a)AEBV10@@Z -@ stub -arch=win32 ??$cosh(a)N@std@@YA?AV?$complex(a)N@0(a)ABV10@@Z -@ stub -arch=win64 ??$cosh(a)N@std@@YA?AV?$complex(a)N@0(a)AEBV10@@Z -@ stub -arch=win32 ??$cosh(a)O@std@@YA?AV?$complex(a)O@0(a)ABV10@@Z -@ stub -arch=win64 ??$cosh(a)O@std@@YA?AV?$complex(a)O@0(a)AEBV10@@Z +@ cdecl -arch=win32 ??$cosh(a)M@std@@YA?AV?$complex(a)M@0(a)ABV10@@Z(ptr ptr) complex_float_cosh +@ cdecl -arch=win64 ??$cosh(a)M@std@@YA?AV?$complex(a)M@0(a)AEBV10@@Z(ptr ptr) complex_float_cosh +@ cdecl -arch=win32 ??$cosh(a)N@std@@YA?AV?$complex(a)N@0(a)ABV10@@Z(ptr ptr) complex_double_cosh +@ cdecl -arch=win64 ??$cosh(a)N@std@@YA?AV?$complex(a)N@0(a)AEBV10@@Z(ptr ptr) complex_double_cosh +@ cdecl -arch=win32 ??$cosh(a)O@std@@YA?AV?$complex(a)O@0(a)ABV10@@Z(ptr ptr) complex_double_cosh +@ cdecl -arch=win64 ??$cosh(a)O@std@@YA?AV?$complex(a)O@0(a)AEBV10@@Z(ptr ptr) complex_double_cosh @ stub -arch=win32 ??$exp(a)M@std@@YA?AV?$complex(a)M@0(a)ABV10@@Z @ stub -arch=win64 ??$exp(a)M@std@@YA?AV?$complex(a)M@0(a)AEBV10@@Z @ stub -arch=win32 ??$exp(a)N@std@@YA?AV?$complex(a)N@0(a)ABV10@@Z @@ -470,12 +470,12 @@ @ cdecl -arch=win64 ??$sin(a)N@std@@YA?AV?$complex(a)N@0(a)AEBV10@@Z(ptr ptr) complex_double_sin @ cdecl -arch=win32 ??$sin(a)O@std@@YA?AV?$complex(a)O@0(a)ABV10@@Z(ptr ptr) complex_double_sin @ cdecl -arch=win64 ??$sin(a)O@std@@YA?AV?$complex(a)O@0(a)AEBV10@@Z(ptr ptr) complex_double_sin -@ stub -arch=win32 ??$sinh(a)M@std@@YA?AV?$complex(a)M@0(a)ABV10@@Z -@ stub -arch=win64 ??$sinh(a)M@std@@YA?AV?$complex(a)M@0(a)AEBV10@@Z -@ stub -arch=win32 ??$sinh(a)N@std@@YA?AV?$complex(a)N@0(a)ABV10@@Z -@ stub -arch=win64 ??$sinh(a)N@std@@YA?AV?$complex(a)N@0(a)AEBV10@@Z -@ stub -arch=win32 ??$sinh(a)O@std@@YA?AV?$complex(a)O@0(a)ABV10@@Z -@ stub -arch=win64 ??$sinh(a)O@std@@YA?AV?$complex(a)O@0(a)AEBV10@@Z +@ cdecl -arch=win32 ??$sinh(a)M@std@@YA?AV?$complex(a)M@0(a)ABV10@@Z(ptr ptr) complex_float_sinh +@ cdecl -arch=win64 ??$sinh(a)M@std@@YA?AV?$complex(a)M@0(a)AEBV10@@Z(ptr ptr) complex_float_sinh +@ cdecl -arch=win32 ??$sinh(a)N@std@@YA?AV?$complex(a)N@0(a)ABV10@@Z(ptr ptr) complex_double_sinh +@ cdecl -arch=win64 ??$sinh(a)N@std@@YA?AV?$complex(a)N@0(a)AEBV10@@Z(ptr ptr) complex_double_sinh +@ cdecl -arch=win32 ??$sinh(a)O@std@@YA?AV?$complex(a)O@0(a)ABV10@@Z(ptr ptr) complex_double_sinh +@ cdecl -arch=win64 ??$sinh(a)O@std@@YA?AV?$complex(a)O@0(a)AEBV10@@Z(ptr ptr) complex_double_sinh @ stub -arch=win32 ??$sqrt(a)M@std@@YA?AV?$complex(a)M@0(a)ABV10@@Z @ stub -arch=win64 ??$sqrt(a)M@std@@YA?AV?$complex(a)M@0(a)AEBV10@@Z @ stub -arch=win32 ??$sqrt(a)N@std@@YA?AV?$complex(a)N@0(a)ABV10@@Z @@ -488,12 +488,12 @@ @ cdecl -arch=win64 ??$tan(a)N@std@@YA?AV?$complex(a)N@0(a)AEBV10@@Z(ptr ptr) complex_double_tan @ cdecl -arch=win32 ??$tan(a)O@std@@YA?AV?$complex(a)O@0(a)ABV10@@Z(ptr ptr) complex_double_tan @ cdecl -arch=win64 ??$tan(a)O@std@@YA?AV?$complex(a)O@0(a)AEBV10@@Z(ptr ptr) complex_double_tan -@ stub -arch=win32 ??$tanh(a)M@std@@YA?AV?$complex(a)M@0(a)ABV10@@Z -@ stub -arch=win64 ??$tanh(a)M@std@@YA?AV?$complex(a)M@0(a)AEBV10@@Z -@ stub -arch=win32 ??$tanh(a)N@std@@YA?AV?$complex(a)N@0(a)ABV10@@Z -@ stub -arch=win64 ??$tanh(a)N@std@@YA?AV?$complex(a)N@0(a)AEBV10@@Z -@ stub -arch=win32 ??$tanh(a)O@std@@YA?AV?$complex(a)O@0(a)ABV10@@Z -@ stub -arch=win64 ??$tanh(a)O@std@@YA?AV?$complex(a)O@0(a)AEBV10@@Z +@ cdecl -arch=win32 ??$tanh(a)M@std@@YA?AV?$complex(a)M@0(a)ABV10@@Z(ptr ptr) complex_float_tanh +@ cdecl -arch=win64 ??$tanh(a)M@std@@YA?AV?$complex(a)M@0(a)AEBV10@@Z(ptr ptr) complex_float_tanh +@ cdecl -arch=win32 ??$tanh(a)N@std@@YA?AV?$complex(a)N@0(a)ABV10@@Z(ptr ptr) complex_double_tanh +@ cdecl -arch=win64 ??$tanh(a)N@std@@YA?AV?$complex(a)N@0(a)AEBV10@@Z(ptr ptr) complex_double_tanh +@ cdecl -arch=win32 ??$tanh(a)O@std@@YA?AV?$complex(a)O@0(a)ABV10@@Z(ptr ptr) complex_double_tanh +@ cdecl -arch=win64 ??$tanh(a)O@std@@YA?AV?$complex(a)O@0(a)AEBV10@@Z(ptr ptr) complex_double_tanh @ thiscall -arch=win32 ??0?$_Complex_base(a)MU_C_float_complex@@@std@@QAE(a)ABM0@Z(ptr ptr ptr) complex_float_ctor @ cdecl -arch=win64 ??0?$_Complex_base(a)MU_C_float_complex@@@std@@QEAA(a)AEBM0@Z(ptr ptr ptr) complex_float_ctor @ thiscall -arch=win32 ??0?$_Complex_base(a)NU_C_double_complex@@@std@@QAE(a)ABN0@Z(ptr ptr ptr) complex_double_ctor
participants (1)
-
Alexandre Julliard