Piotr Caban : msvcp90: Added complex trigonometric functions implementation .

Alexandre Julliard julliard at winehq.org
Thu Jan 24 12:59:49 CST 2013


Module: wine
Branch: master
Commit: ed0e16ae3dfaa0e68f00a345f41661ca3267b40b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ed0e16ae3dfaa0e68f00a345f41661ca3267b40b

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Thu Jan 24 12:28:47 2013 +0100

msvcp90: Added complex trigonometric functions implementation.

---

 dlls/msvcp90/math.c       |   62 +++++++++++++++++++++++++++++++++++++++++++++
 dlls/msvcp90/msvcp90.spec |   36 +++++++++++++-------------
 2 files changed, 80 insertions(+), 18 deletions(-)

diff --git a/dlls/msvcp90/math.c b/dlls/msvcp90/math.c
index 9f75cd4..c13fd3c 100644
--- a/dlls/msvcp90/math.c
+++ b/dlls/msvcp90/math.c
@@ -1312,6 +1312,34 @@ complex_float* __cdecl complex_float_conj(complex_float *ret, const complex_floa
     return ret;
 }
 
+/* ??$cos at M@std@@YA?AV?$complex at M@0 at ABV10@@Z */
+/* ??$cos at M@std@@YA?AV?$complex at M@0 at AEBV10@@Z */
+complex_float* __cdecl complex_float_cos(complex_float *ret, const complex_float *c)
+{
+    ret->real = cos(c->real)*cosh(c->imag);
+    ret->imag = -sin(c->real)*sinh(c->imag);
+    return ret;
+}
+
+/* ??$sin at M@std@@YA?AV?$complex at M@0 at ABV10@@Z */
+/* ??$sin at M@std@@YA?AV?$complex at M@0 at AEBV10@@Z */
+complex_float* __cdecl complex_float_sin(complex_float *ret, const complex_float *c)
+{
+    ret->real = sin(c->real)*cosh(c->imag);
+    ret->imag = cos(c->real)*sinh(c->imag);
+    return ret;
+}
+
+/* ??$tan at M@std@@YA?AV?$complex at M@0 at ABV10@@Z */
+/* ??$tan at M@std@@YA?AV?$complex at M@0 at AEBV10@@Z */
+complex_float* __cdecl complex_float_tan(complex_float *ret, const complex_float *c)
+{
+    double denom = cos(2*c->real) + cosh(2*c->imag);
+    ret->real = sin(2*c->real) / denom;
+    ret->imag = sinh(2*c->imag) / denom;
+    return ret;
+}
+
 /* ??0?$_Complex_base at NU_C_double_complex@@@std@@QAE at ABN0@Z */
 /* ??0?$_Complex_base at NU_C_double_complex@@@std@@QEAA at AEBN0@Z */
 /* ??0?$_Complex_base at OU_C_ldouble_complex@@@std@@QAE at ABO0@Z */
@@ -1820,3 +1848,37 @@ complex_double* __cdecl complex_double_conj(complex_double *ret, const complex_d
     ret->imag = -c->imag;
     return ret;
 }
+
+/* ??$cos at N@std@@YA?AV?$complex at N@0 at ABV10@@Z */
+/* ??$cos at N@std@@YA?AV?$complex at N@0 at AEBV10@@Z */
+/* ??$cos at O@std@@YA?AV?$complex at O@0 at ABV10@@Z */
+/* ??$cos at O@std@@YA?AV?$complex at O@0 at AEBV10@@Z */
+complex_double* __cdecl complex_double_cos(complex_double *ret, const complex_double *c)
+{
+    ret->real = cos(c->real)*cosh(c->imag);
+    ret->imag = -sin(c->real)*sinh(c->imag);
+    return ret;
+}
+
+/* ??$sin at N@std@@YA?AV?$complex at N@0 at ABV10@@Z */
+/* ??$sin at N@std@@YA?AV?$complex at N@0 at AEBV10@@Z */
+/* ??$sin at O@std@@YA?AV?$complex at O@0 at ABV10@@Z */
+/* ??$sin at O@std@@YA?AV?$complex at O@0 at AEBV10@@Z */
+complex_double* __cdecl complex_double_sin(complex_double *ret, const complex_double *c)
+{
+    ret->real = sin(c->real)*cosh(c->imag);
+    ret->imag = cos(c->real)*sinh(c->imag);
+    return ret;
+}
+
+/* ??$tan at N@std@@YA?AV?$complex at N@0 at ABV10@@Z */
+/* ??$tan at N@std@@YA?AV?$complex at N@0 at AEBV10@@Z */
+/* ??$tan at O@std@@YA?AV?$complex at O@0 at ABV10@@Z */
+/* ??$tan at O@std@@YA?AV?$complex at O@0 at AEBV10@@Z */
+complex_double* __cdecl complex_double_tan(complex_double *ret, const complex_double *c)
+{
+    double denom = cos(2*c->real) + cosh(2*c->imag);
+    ret->real = sin(2*c->real) / denom;
+    ret->imag = sinh(2*c->imag) / denom;
+    return ret;
+}
diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec
index 5e53c6d..3022505 100644
--- a/dlls/msvcp90/msvcp90.spec
+++ b/dlls/msvcp90/msvcp90.spec
@@ -368,12 +368,12 @@
 @ cdecl -arch=win64 ??$conj at N@std@@YA?AV?$complex at N@0 at AEBV10@@Z(ptr ptr) complex_double_conj
 @ cdecl -arch=win32 ??$conj at O@std@@YA?AV?$complex at O@0 at ABV10@@Z(ptr ptr) complex_double_conj
 @ cdecl -arch=win64 ??$conj at O@std@@YA?AV?$complex at O@0 at AEBV10@@Z(ptr ptr) complex_double_conj
-@ stub -arch=win32 ??$cos at M@std@@YA?AV?$complex at M@0 at ABV10@@Z
-@ stub -arch=win64 ??$cos at M@std@@YA?AV?$complex at M@0 at AEBV10@@Z
-@ stub -arch=win32 ??$cos at N@std@@YA?AV?$complex at N@0 at ABV10@@Z
-@ stub -arch=win64 ??$cos at N@std@@YA?AV?$complex at N@0 at AEBV10@@Z
-@ stub -arch=win32 ??$cos at O@std@@YA?AV?$complex at O@0 at ABV10@@Z
-@ stub -arch=win64 ??$cos at O@std@@YA?AV?$complex at O@0 at AEBV10@@Z
+@ cdecl -arch=win32 ??$cos at M@std@@YA?AV?$complex at M@0 at ABV10@@Z(ptr ptr) complex_float_cos
+@ cdecl -arch=win64 ??$cos at M@std@@YA?AV?$complex at M@0 at AEBV10@@Z(ptr ptr) complex_float_cos
+@ cdecl -arch=win32 ??$cos at N@std@@YA?AV?$complex at N@0 at ABV10@@Z(ptr ptr) complex_double_cos
+@ cdecl -arch=win64 ??$cos at N@std@@YA?AV?$complex at N@0 at AEBV10@@Z(ptr ptr) complex_double_cos
+@ cdecl -arch=win32 ??$cos at O@std@@YA?AV?$complex at O@0 at ABV10@@Z(ptr ptr) complex_double_cos
+@ cdecl -arch=win64 ??$cos at O@std@@YA?AV?$complex at O@0 at AEBV10@@Z(ptr ptr) complex_double_cos
 @ stub -arch=win32 ??$cosh at M@std@@YA?AV?$complex at M@0 at ABV10@@Z
 @ stub -arch=win64 ??$cosh at M@std@@YA?AV?$complex at M@0 at AEBV10@@Z
 @ stub -arch=win32 ??$cosh at N@std@@YA?AV?$complex at N@0 at ABV10@@Z
@@ -464,12 +464,12 @@
 @ cdecl -arch=win64 ??$real at N@std@@YANAEBV?$complex at N@0@@Z(ptr) complex_double_real
 @ cdecl -arch=win32 ??$real at O@std@@YAOABV?$complex at O@0@@Z(ptr) complex_double_real
 @ cdecl -arch=win64 ??$real at O@std@@YAOAEBV?$complex at O@0@@Z(ptr) complex_double_real
-@ stub -arch=win32 ??$sin at M@std@@YA?AV?$complex at M@0 at ABV10@@Z
-@ stub -arch=win64 ??$sin at M@std@@YA?AV?$complex at M@0 at AEBV10@@Z
-@ stub -arch=win32 ??$sin at N@std@@YA?AV?$complex at N@0 at ABV10@@Z
-@ stub -arch=win64 ??$sin at N@std@@YA?AV?$complex at N@0 at AEBV10@@Z
-@ stub -arch=win32 ??$sin at O@std@@YA?AV?$complex at O@0 at ABV10@@Z
-@ stub -arch=win64 ??$sin at O@std@@YA?AV?$complex at O@0 at AEBV10@@Z
+@ cdecl -arch=win32 ??$sin at M@std@@YA?AV?$complex at M@0 at ABV10@@Z(ptr ptr) complex_float_sin
+@ cdecl -arch=win64 ??$sin at M@std@@YA?AV?$complex at M@0 at AEBV10@@Z(ptr ptr) complex_float_sin
+@ cdecl -arch=win32 ??$sin at N@std@@YA?AV?$complex at N@0 at ABV10@@Z(ptr ptr) complex_double_sin
+@ cdecl -arch=win64 ??$sin at N@std@@YA?AV?$complex at N@0 at AEBV10@@Z(ptr ptr) complex_double_sin
+@ cdecl -arch=win32 ??$sin at O@std@@YA?AV?$complex at O@0 at ABV10@@Z(ptr ptr) complex_double_sin
+@ cdecl -arch=win64 ??$sin at O@std@@YA?AV?$complex at O@0 at AEBV10@@Z(ptr ptr) complex_double_sin
 @ stub -arch=win32 ??$sinh at M@std@@YA?AV?$complex at M@0 at ABV10@@Z
 @ stub -arch=win64 ??$sinh at M@std@@YA?AV?$complex at M@0 at AEBV10@@Z
 @ stub -arch=win32 ??$sinh at N@std@@YA?AV?$complex at N@0 at ABV10@@Z
@@ -482,12 +482,12 @@
 @ stub -arch=win64 ??$sqrt at N@std@@YA?AV?$complex at N@0 at AEBV10@@Z
 @ stub -arch=win32 ??$sqrt at O@std@@YA?AV?$complex at O@0 at ABV10@@Z
 @ stub -arch=win64 ??$sqrt at O@std@@YA?AV?$complex at O@0 at AEBV10@@Z
-@ stub -arch=win32 ??$tan at M@std@@YA?AV?$complex at M@0 at ABV10@@Z
-@ stub -arch=win64 ??$tan at M@std@@YA?AV?$complex at M@0 at AEBV10@@Z
-@ stub -arch=win32 ??$tan at N@std@@YA?AV?$complex at N@0 at ABV10@@Z
-@ stub -arch=win64 ??$tan at N@std@@YA?AV?$complex at N@0 at AEBV10@@Z
-@ stub -arch=win32 ??$tan at O@std@@YA?AV?$complex at O@0 at ABV10@@Z
-@ stub -arch=win64 ??$tan at O@std@@YA?AV?$complex at O@0 at AEBV10@@Z
+@ cdecl -arch=win32 ??$tan at M@std@@YA?AV?$complex at M@0 at ABV10@@Z(ptr ptr) complex_float_tan
+@ cdecl -arch=win64 ??$tan at M@std@@YA?AV?$complex at M@0 at AEBV10@@Z(ptr ptr) complex_float_tan
+@ cdecl -arch=win32 ??$tan at N@std@@YA?AV?$complex at N@0 at ABV10@@Z(ptr ptr) complex_double_tan
+@ cdecl -arch=win64 ??$tan at N@std@@YA?AV?$complex at N@0 at AEBV10@@Z(ptr ptr) complex_double_tan
+@ cdecl -arch=win32 ??$tan at O@std@@YA?AV?$complex at O@0 at ABV10@@Z(ptr ptr) complex_double_tan
+@ cdecl -arch=win64 ??$tan at O@std@@YA?AV?$complex at O@0 at AEBV10@@Z(ptr ptr) complex_double_tan
 @ stub -arch=win32 ??$tanh at M@std@@YA?AV?$complex at M@0 at ABV10@@Z
 @ stub -arch=win64 ??$tanh at M@std@@YA?AV?$complex at M@0 at AEBV10@@Z
 @ stub -arch=win32 ??$tanh at N@std@@YA?AV?$complex at N@0 at ABV10@@Z




More information about the wine-cvs mailing list