From: YongHao Hu Subject: msvcp90: Add complex_float_pow implementation and tests Message-Id: <5360B45F.5060008@gmail.com> Date: Wed, 30 Apr 2014 16:29:19 +0800 Try 2: - Superseded Patch 104167 - No real code change - Fix commit message typos. (Thanks Qian Hong) --- dlls/msvcp70/msvcp70.spec | 12 ++++----- dlls/msvcp71/msvcp71.spec | 12 ++++----- dlls/msvcp80/msvcp80.spec | 12 ++++----- dlls/msvcp90/math.c | 18 ++++++++++++++ dlls/msvcp90/msvcp90.spec | 12 ++++----- dlls/msvcp90/tests/misc.c | 60 +++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 102 insertions(+), 24 deletions(-) diff --git a/dlls/msvcp70/msvcp70.spec b/dlls/msvcp70/msvcp70.spec index 8ff6620..ef2aec9 100644 --- a/dlls/msvcp70/msvcp70.spec +++ b/dlls/msvcp70/msvcp70.spec @@ -4131,15 +4131,15 @@ @ stub -arch=win64 ?pow@std@@YA?AV?$complex@M@1@AEBV21@0@Z @ stub -arch=win32 ?pow@std@@YA?AV?$complex@M@1@ABV21@ABM@Z @ stub -arch=win64 ?pow@std@@YA?AV?$complex@M@1@AEBV21@AEBM@Z -@ stub -arch=win32 ?pow@std@@YA?AV?$complex@M@1@ABV21@H@Z -@ stub -arch=win64 ?pow@std@@YA?AV?$complex@M@1@AEBV21@H@Z +@ cdecl -arch=win32 ?pow@std@@YA?AV?$complex@M@1@ABV21@H@Z(ptr ptr long) complex_float_pow_ci +@ cdecl -arch=win64 ?pow@std@@YA?AV?$complex@M@1@AEBV21@H@Z(ptr ptr long) complex_float_pow_ci @ stub -arch=win32 ?pow@std@@YA?AV?$complex@N@1@ABNABV21@@Z @ stub -arch=win64 ?pow@std@@YA?AV?$complex@N@1@AEBNAEBV21@@Z @ stub -arch=win32 ?pow@std@@YA?AV?$complex@N@1@ABV21@0@Z @ stub -arch=win64 ?pow@std@@YA?AV?$complex@N@1@AEBV21@0@Z @ stub -arch=win32 ?pow@std@@YA?AV?$complex@N@1@ABV21@ABN@Z -@ stub -arch=win64 ?pow@std@@YA?AV?$complex@N@1@AEBV21@AEBN@Z -@ stub -arch=win32 ?pow@std@@YA?AV?$complex@N@1@ABV21@H@Z +@ cdecl -arch=win64 ?pow@std@@YA?AV?$complex@N@1@AEBV21@AEBN@Z(ptr ptr long) complex_double_pow_ci +@ cdecl -arch=win32 ?pow@std@@YA?AV?$complex@N@1@ABV21@H@Z(ptr ptr long) complex_double_pow_ci @ stub -arch=win64 ?pow@std@@YA?AV?$complex@N@1@AEBV21@H@Z @ stub -arch=win32 ?pow@std@@YA?AV?$complex@O@1@ABOABV21@@Z @ stub -arch=win64 ?pow@std@@YA?AV?$complex@O@1@AEBOAEBV21@@Z @@ -4147,8 +4147,8 @@ @ stub -arch=win64 ?pow@std@@YA?AV?$complex@O@1@AEBV21@0@Z @ stub -arch=win32 ?pow@std@@YA?AV?$complex@O@1@ABV21@ABO@Z @ stub -arch=win64 ?pow@std@@YA?AV?$complex@O@1@AEBV21@AEBO@Z -@ stub -arch=win32 ?pow@std@@YA?AV?$complex@O@1@ABV21@H@Z -@ stub -arch=win64 ?pow@std@@YA?AV?$complex@O@1@AEBV21@H@Z +@ cdecl -arch=win32 ?pow@std@@YA?AV?$complex@O@1@ABV21@H@Z(ptr ptr long) complex_double_pow_ci +@ cdecl -arch=win64 ?pow@std@@YA?AV?$complex@O@1@AEBV21@H@Z(ptr ptr long) complex_double_pow_ci @ thiscall -arch=i386 ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ(ptr) basic_streambuf_char_pptr @ cdecl -arch=win64 ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ(ptr) basic_streambuf_char_pptr @ thiscall -arch=i386 ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ(ptr) basic_streambuf_wchar_pptr diff --git a/dlls/msvcp71/msvcp71.spec b/dlls/msvcp71/msvcp71.spec index 3dc82a7..00662cf 100644 --- a/dlls/msvcp71/msvcp71.spec +++ b/dlls/msvcp71/msvcp71.spec @@ -440,24 +440,24 @@ @ cdecl -arch=win64 ??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@0@Z(ptr ptr ptr) complex_float_pow @ cdecl -arch=win32 ??$pow@M@std@@YA?AV?$complex@M@0@ABV10@ABM@Z(ptr ptr ptr) complex_float_pow_cf @ cdecl -arch=win64 ??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@AEBM@Z(ptr ptr ptr) complex_float_pow_cf -@ stub -arch=win32 ??$pow@M@std@@YA?AV?$complex@M@0@ABV10@H@Z -@ stub -arch=win64 ??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@H@Z +@ cdecl -arch=win32 ??$pow@M@std@@YA?AV?$complex@M@0@ABV10@H@Z(ptr ptr long) complex_float_pow_ci +@ cdecl -arch=win64 ??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@H@Z(ptr ptr long) complex_float_pow_ci @ cdecl -arch=win32 ??$pow@N@std@@YA?AV?$complex@N@0@ABNABV10@@Z(ptr ptr ptr) complex_double_pow_dc @ cdecl -arch=win64 ??$pow@N@std@@YA?AV?$complex@N@0@AEBNAEBV10@@Z(ptr ptr ptr) complex_double_pow_dc @ cdecl -arch=win32 ??$pow@N@std@@YA?AV?$complex@N@0@ABV10@0@Z(ptr ptr ptr) complex_double_pow @ cdecl -arch=win64 ??$pow@N@std@@YA?AV?$complex@N@0@AEBV10@0@Z(ptr ptr ptr) complex_double_pow @ cdecl -arch=win32 ??$pow@N@std@@YA?AV?$complex@N@0@ABV10@ABN@Z(ptr ptr ptr) complex_double_pow_cd @ cdecl -arch=win64 ??$pow@N@std@@YA?AV?$complex@N@0@AEBV10@AEBN@Z(ptr ptr ptr) complex_double_pow_cd -@ stub -arch=win32 ??$pow@N@std@@YA?AV?$complex@N@0@ABV10@H@Z -@ stub -arch=win64 ??$pow@N@std@@YA?AV?$complex@N@0@AEBV10@H@Z +@ cdecl -arch=win32 ??$pow@N@std@@YA?AV?$complex@N@0@ABV10@H@Z(ptr ptr long) complex_double_pow_ci +@ cdecl -arch=win64 ??$pow@N@std@@YA?AV?$complex@N@0@AEBV10@H@Z(ptr ptr long) complex_double_pow_ci @ cdecl -arch=win32 ??$pow@O@std@@YA?AV?$complex@O@0@ABOABV10@@Z(ptr ptr ptr) complex_double_pow_dc @ cdecl -arch=win64 ??$pow@O@std@@YA?AV?$complex@O@0@AEBOAEBV10@@Z(ptr ptr ptr) complex_double_pow_dc @ cdecl -arch=win32 ??$pow@O@std@@YA?AV?$complex@O@0@ABV10@0@Z(ptr ptr ptr) complex_double_pow @ cdecl -arch=win64 ??$pow@O@std@@YA?AV?$complex@O@0@AEBV10@0@Z(ptr ptr ptr) complex_double_pow @ cdecl -arch=win32 ??$pow@O@std@@YA?AV?$complex@O@0@ABV10@ABO@Z(ptr ptr ptr) complex_double_pow_cd @ cdecl -arch=win64 ??$pow@O@std@@YA?AV?$complex@O@0@AEBV10@AEBO@Z(ptr ptr ptr) complex_double_pow_cd -@ stub -arch=win32 ??$pow@O@std@@YA?AV?$complex@O@0@ABV10@H@Z -@ stub -arch=win64 ??$pow@O@std@@YA?AV?$complex@O@0@AEBV10@H@Z +@ cdecl -arch=win32 ??$pow@O@std@@YA?AV?$complex@O@0@ABV10@H@Z(ptr ptr long) complex_double_pow_ci +@ cdecl -arch=win64 ??$pow@O@std@@YA?AV?$complex@O@0@AEBV10@H@Z(ptr ptr long) complex_double_pow_ci @ cdecl -arch=win32 ??$real@M@std@@YAMABV?$complex@M@0@@Z(ptr) complex_float_real @ cdecl -arch=win64 ??$real@M@std@@YAMAEBV?$complex@M@0@@Z(ptr) complex_float_real @ cdecl -arch=win32 ??$real@N@std@@YANABV?$complex@N@0@@Z(ptr) complex_double_real diff --git a/dlls/msvcp80/msvcp80.spec b/dlls/msvcp80/msvcp80.spec index 1550cc6..60ed234 100644 --- a/dlls/msvcp80/msvcp80.spec +++ b/dlls/msvcp80/msvcp80.spec @@ -440,24 +440,24 @@ @ cdecl -arch=win64 ??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@0@Z(ptr ptr ptr) complex_float_pow @ cdecl -arch=win32 ??$pow@M@std@@YA?AV?$complex@M@0@ABV10@ABM@Z(ptr ptr ptr) complex_float_pow_cf @ cdecl -arch=win64 ??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@AEBM@Z(ptr ptr ptr) complex_float_pow_cf -@ stub -arch=win32 ??$pow@M@std@@YA?AV?$complex@M@0@ABV10@H@Z -@ stub -arch=win64 ??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@H@Z +@ cdecl -arch=win32 ??$pow@M@std@@YA?AV?$complex@M@0@ABV10@H@Z(ptr ptr long) complex_float_pow_ci +@ cdecl -arch=win64 ??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@H@Z(ptr ptr long) complex_float_pow_ci @ cdecl -arch=win32 ??$pow@N@std@@YA?AV?$complex@N@0@ABNABV10@@Z(ptr ptr ptr) complex_double_pow_dc @ cdecl -arch=win64 ??$pow@N@std@@YA?AV?$complex@N@0@AEBNAEBV10@@Z(ptr ptr ptr) complex_double_pow_dc @ cdecl -arch=win32 ??$pow@N@std@@YA?AV?$complex@N@0@ABV10@0@Z(ptr ptr ptr) complex_double_pow @ cdecl -arch=win64 ??$pow@N@std@@YA?AV?$complex@N@0@AEBV10@0@Z(ptr ptr ptr) complex_double_pow @ cdecl -arch=win32 ??$pow@N@std@@YA?AV?$complex@N@0@ABV10@ABN@Z(ptr ptr ptr) complex_double_pow_cd @ cdecl -arch=win64 ??$pow@N@std@@YA?AV?$complex@N@0@AEBV10@AEBN@Z(ptr ptr ptr) complex_double_pow_cd -@ stub -arch=win32 ??$pow@N@std@@YA?AV?$complex@N@0@ABV10@H@Z -@ stub -arch=win64 ??$pow@N@std@@YA?AV?$complex@N@0@AEBV10@H@Z +@ cdecl -arch=win32 ??$pow@N@std@@YA?AV?$complex@N@0@ABV10@H@Z(ptr ptr long) complex_double_pow_ci +@ cdecl -arch=win64 ??$pow@N@std@@YA?AV?$complex@N@0@AEBV10@H@Z(ptr ptr long) complex_double_pow_ci @ cdecl -arch=win32 ??$pow@O@std@@YA?AV?$complex@O@0@ABOABV10@@Z(ptr ptr ptr) complex_double_pow_dc @ cdecl -arch=win64 ??$pow@O@std@@YA?AV?$complex@O@0@AEBOAEBV10@@Z(ptr ptr ptr) complex_double_pow_dc @ cdecl -arch=win32 ??$pow@O@std@@YA?AV?$complex@O@0@ABV10@0@Z(ptr ptr ptr) complex_double_pow @ cdecl -arch=win64 ??$pow@O@std@@YA?AV?$complex@O@0@AEBV10@0@Z(ptr ptr ptr) complex_double_pow @ cdecl -arch=win32 ??$pow@O@std@@YA?AV?$complex@O@0@ABV10@ABO@Z(ptr ptr ptr) complex_double_pow_cd @ cdecl -arch=win64 ??$pow@O@std@@YA?AV?$complex@O@0@AEBV10@AEBO@Z(ptr ptr ptr) complex_double_pow_cd -@ stub -arch=win32 ??$pow@O@std@@YA?AV?$complex@O@0@ABV10@H@Z -@ stub -arch=win64 ??$pow@O@std@@YA?AV?$complex@O@0@AEBV10@H@Z +@ cdecl -arch=win32 ??$pow@O@std@@YA?AV?$complex@O@0@ABV10@H@Z(ptr ptr long) complex_double_pow_ci +@ cdecl -arch=win64 ??$pow@O@std@@YA?AV?$complex@O@0@AEBV10@H@Z(ptr ptr long) complex_double_pow_ci @ cdecl -arch=win32 ??$real@M@std@@YAMABV?$complex@M@0@@Z(ptr) complex_float_real @ cdecl -arch=win64 ??$real@M@std@@YAMAEBV?$complex@M@0@@Z(ptr) complex_float_real @ cdecl -arch=win32 ??$real@N@std@@YANABV?$complex@N@0@@Z(ptr) complex_double_real diff --git a/dlls/msvcp90/math.c b/dlls/msvcp90/math.c index 11d3c75..070f447 100644 --- a/dlls/msvcp90/math.c +++ b/dlls/msvcp90/math.c @@ -1462,6 +1462,14 @@ complex_float* __cdecl complex_float_pow_cf(complex_float *ret, const complex_fl return complex_float_pow(ret, l, &c); } +/* ??$pow@M@std@@YA?AV?$complex@M@0@ABV10@H@Z */ +/* ??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@H@Z */ +complex_float* __cdecl complex_float_pow_ci(complex_float *ret, const complex_float *l, int r) +{ + complex_float c = { (float)r, 0 }; + return complex_float_pow(ret, l, &c); +} + /* ??$sqrt@M@std@@YA?AV?$complex@M@0@ABV10@@Z */ /* ??$sqrt@M@std@@YA?AV?$complex@M@0@AEBV10@@Z */ complex_float* __cdecl complex_float_sqrt(complex_float *ret, const complex_float *l) @@ -2158,6 +2166,16 @@ complex_double* __cdecl complex_double_pow_cd(complex_double *ret, const complex return complex_double_pow(ret, l, &c); } +/* ??$pow@N@std@@YA?AV?$complex@N@0@ABV10@H@Z */ +/* ??$pow@N@std@@YA?AV?$complex@N@0@AEBV10@H@Z */ +/* ??$pow@O@std@@YA?AV?$complex@O@0@ABV10@H@Z */ +/* ??$pow@O@std@@YA?AV?$complex@O@0@AEBV10@H@Z */ +complex_double* __cdecl complex_double_pow_ci(complex_double *ret, const complex_double *l, int r) +{ + complex_double c = { r, 0 }; + return complex_double_pow(ret, l, &c); +} + /* ??$sqrt@N@std@@YA?AV?$complex@N@0@ABV10@@Z */ /* ??$sqrt@N@std@@YA?AV?$complex@N@0@AEBV10@@Z */ /* ??$sqrt@O@std@@YA?AV?$complex@O@0@ABV10@@Z */ diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index fe02bbb..f5ef279 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -440,24 +440,24 @@ @ cdecl -arch=win64 ??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@0@Z(ptr ptr ptr) complex_float_pow @ cdecl -arch=win32 ??$pow@M@std@@YA?AV?$complex@M@0@ABV10@ABM@Z(ptr ptr ptr) complex_float_pow_cf @ cdecl -arch=win64 ??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@AEBM@Z(ptr ptr ptr) complex_float_pow_cf -@ stub -arch=win32 ??$pow@M@std@@YA?AV?$complex@M@0@ABV10@H@Z -@ stub -arch=win64 ??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@H@Z +@ cdecl -arch=win32 ??$pow@M@std@@YA?AV?$complex@M@0@ABV10@H@Z(ptr ptr long) complex_float_pow_ci +@ cdecl -arch=win64 ??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@H@Z(ptr ptr long) complex_float_pow_ci @ cdecl -arch=win32 ??$pow@N@std@@YA?AV?$complex@N@0@ABNABV10@@Z(ptr ptr ptr) complex_double_pow_dc @ cdecl -arch=win64 ??$pow@N@std@@YA?AV?$complex@N@0@AEBNAEBV10@@Z(ptr ptr ptr) complex_double_pow_dc @ cdecl -arch=win32 ??$pow@N@std@@YA?AV?$complex@N@0@ABV10@0@Z(ptr ptr ptr) complex_double_pow @ cdecl -arch=win64 ??$pow@N@std@@YA?AV?$complex@N@0@AEBV10@0@Z(ptr ptr ptr) complex_double_pow @ cdecl -arch=win32 ??$pow@N@std@@YA?AV?$complex@N@0@ABV10@ABN@Z(ptr ptr ptr) complex_double_pow_cd @ cdecl -arch=win64 ??$pow@N@std@@YA?AV?$complex@N@0@AEBV10@AEBN@Z(ptr ptr ptr) complex_double_pow_cd -@ stub -arch=win32 ??$pow@N@std@@YA?AV?$complex@N@0@ABV10@H@Z -@ stub -arch=win64 ??$pow@N@std@@YA?AV?$complex@N@0@AEBV10@H@Z +@ cdecl -arch=win32 ??$pow@N@std@@YA?AV?$complex@N@0@ABV10@H@Z(ptr ptr long) complex_double_pow_ci +@ cdecl -arch=win64 ??$pow@N@std@@YA?AV?$complex@N@0@AEBV10@H@Z(ptr ptr long) complex_double_pow_ci @ cdecl -arch=win32 ??$pow@O@std@@YA?AV?$complex@O@0@ABOABV10@@Z(ptr ptr ptr) complex_double_pow_dc @ cdecl -arch=win64 ??$pow@O@std@@YA?AV?$complex@O@0@AEBOAEBV10@@Z(ptr ptr ptr) complex_double_pow_dc @ cdecl -arch=win32 ??$pow@O@std@@YA?AV?$complex@O@0@ABV10@0@Z(ptr ptr ptr) complex_double_pow @ cdecl -arch=win64 ??$pow@O@std@@YA?AV?$complex@O@0@AEBV10@0@Z(ptr ptr ptr) complex_double_pow @ cdecl -arch=win32 ??$pow@O@std@@YA?AV?$complex@O@0@ABV10@ABO@Z(ptr ptr ptr) complex_double_pow_cd @ cdecl -arch=win64 ??$pow@O@std@@YA?AV?$complex@O@0@AEBV10@AEBO@Z(ptr ptr ptr) complex_double_pow_cd -@ stub -arch=win32 ??$pow@O@std@@YA?AV?$complex@O@0@ABV10@H@Z -@ stub -arch=win64 ??$pow@O@std@@YA?AV?$complex@O@0@AEBV10@H@Z +@ cdecl -arch=win32 ??$pow@O@std@@YA?AV?$complex@O@0@ABV10@H@Z(ptr ptr long) complex_double_pow_ci +@ cdecl -arch=win64 ??$pow@O@std@@YA?AV?$complex@O@0@AEBV10@H@Z(ptr ptr long) complex_double_pow_ci @ cdecl -arch=win32 ??$real@M@std@@YAMABV?$complex@M@0@@Z(ptr) complex_float_real @ cdecl -arch=win64 ??$real@M@std@@YAMAEBV?$complex@M@0@@Z(ptr) complex_float_real @ cdecl -arch=win32 ??$real@N@std@@YANABV?$complex@N@0@@Z(ptr) complex_double_real diff --git a/dlls/msvcp90/tests/misc.c b/dlls/msvcp90/tests/misc.c index f294b2a..ca492d3 100644 --- a/dlls/msvcp90/tests/misc.c +++ b/dlls/msvcp90/tests/misc.c @@ -118,6 +118,9 @@ static complex_float* (__cdecl *p_complex_float_tan)(complex_float*, const compl static complex_float* (__cdecl *p_complex_float_tanh)(complex_float*, const complex_float*); static complex_float* (__cdecl *p_complex_float_log10)(complex_float*, const complex_float*); static complex_float* (__cdecl *p_complex_float_sqrt)(complex_float*, const complex_float*); +static complex_float* (__cdecl *p_complex_float_pow_ci)(complex_float*, const complex_float*, int); +static complex_float* (__cdecl *p_complex_float_pow_fc)(complex_float*, const float*, const complex_float*); +static complex_float* (__cdecl *p_complex_float_pow_cf)(complex_float*, const complex_float*, const float*); static int invalid_parameter = 0; static void __cdecl test_invalid_parameter_handler(const wchar_t *expression, @@ -266,6 +269,12 @@ static BOOL init(void) "??$log10@M@std@@YA?AV?$complex@M@0@AEBV10@@Z"); SET(p_complex_float_sqrt, "??$sqrt@M@std@@YA?AV?$complex@M@0@AEBV10@@Z"); + SET(p_complex_float_pow_ci, + "??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@H@Z"); + SET(p_complex_float_pow_fc, + "??$pow@M@std@@YA?AV?$complex@M@0@AEBMAEBV10@@Z"); + SET(p_complex_float_pow_cf, + "??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@AEBM@Z"); } else { #ifdef __arm__ SET(p_char_assign, "?assign@?$char_traits@D@std@@SAXAADABD@Z"); @@ -321,6 +330,12 @@ static BOOL init(void) "??$log10@M@std@@YA?AV?$complex@M@0@ABV10@@Z"); SET(p_complex_float_sqrt, "??$sqrt@M@std@@YA?AV?$complex@M@0@ABV10@@Z"); + SET(p_complex_float_pow_ci, + "??$pow@M@std@@YA?AV?$complex@M@0@ABV10@H@Z"); + SET(p_complex_float_pow_fc, + "??$pow@M@std@@YA?AV?$complex@M@0@ABMABV10@@Z"); + SET(p_complex_float_pow_cf, + "??$pow@M@std@@YA?AV?$complex@M@0@ABV10@ABM@Z"); #else SET(p_char_assign, "?assign@?$char_traits@D@std@@SAXAADABD@Z"); SET(p_wchar_assign, "?assign@?$char_traits@_W@std@@SAXAA_WAB_W@Z"); @@ -375,6 +390,12 @@ static BOOL init(void) "??$log10@M@std@@YA?AV?$complex@M@0@ABV10@@Z"); SET(p_complex_float_sqrt, "??$sqrt@M@std@@YA?AV?$complex@M@0@ABV10@@Z"); + SET(p_complex_float_pow_ci, + "??$pow@M@std@@YA?AV?$complex@M@0@ABV10@H@Z"); + SET(p_complex_float_pow_fc, + "??$pow@M@std@@YA?AV?$complex@M@0@ABMABV10@@Z"); + SET(p_complex_float_pow_cf, + "??$pow@M@std@@YA?AV?$complex@M@0@ABV10@ABM@Z"); #endif } @@ -671,6 +692,7 @@ static void test_complex(void) complex_float c1, c2, c3; float f1, f2; int scale; + int r; f1 = 1; f2 = 2; @@ -786,6 +808,8 @@ static void test_complex(void) c1.real = 0; c1.imag = 0; + r = 3; + f1 = 3.312; p_complex_float_tan(&c2, &c1); ok(c2.real == 0, "c2.real = %f\n", c2.real); ok(c2.imag == 0, "c2.imag = %f\n", c2.imag); @@ -798,6 +822,15 @@ static void test_complex(void) p_complex_float_sqrt(&c2, &c1); ok(c2.real == 0, "c2.real = %f\n", c2.real); ok(c2.imag == 0, "c2.imag = %f\n", c2.imag); + p_complex_float_pow_ci(&c2, &c1, r); + ok(c2.real == 0, "c2.real = %f\n", c2.real); + ok(c2.imag == 0, "c2.imag = %f\n", c2.imag); + p_complex_float_pow_fc(&c2, &f1, &c1); + ok(c2.real == 1, "c2.real = %f\n", c2.real); + ok(c2.imag == 0, "c2.imag = %f\n", c2.imag); + p_complex_float_pow_cf(&c2, &c1, &f1); + ok(c2.real == 0, "c2.real = %f\n", c2.real); + ok(c2.imag == 0, "c2.imag = %f\n", c2.imag); c1.real = 3.14159/2; c1.imag = 0; @@ -813,6 +846,15 @@ static void test_complex(void) p_complex_float_sqrt(&c2, &c1); ok(almost_eq(c2.real, 1.253314), "c2.real = %f\n", c2.real); ok(c2.imag == 0, "c2.imag = %g\n", c2.imag); + p_complex_float_pow_ci(&c2, &c1, r); + ok(almost_eq(c2.real, 3.875775), "c2.real = %f\n", c2.real); + ok(c2.imag == 0, "c2.imag = %g\n", c2.imag); + p_complex_float_pow_fc(&c2, &f1, &c1); + ok(almost_eq(c2.real, 6.560778), "c2.real = %f\n", c2.real); + ok(c2.imag == 0, "c2.imag = %f\n", c2.imag); + p_complex_float_pow_cf(&c2, &c1, &f1); + ok(almost_eq(c2.real, 4.462188), "c2.real = %f\n", c2.real); + ok(c2.imag == 0, "c2.imag = %f\n", c2.imag); c1.real = 7.12; c1.imag = 0.17; @@ -828,6 +870,15 @@ static void test_complex(void) p_complex_float_sqrt(&c2, &c1); ok(almost_eq(c2.real, 2.668523), "c2.real = %f\n", c2.real); ok(almost_eq(c2.imag, 0.0318528), "c2.imag = %g\n", c2.imag); + p_complex_float_pow_ci(&c2, &c1, r); + ok(almost_eq(c2.real, 360.326782), "c2.real = %f\n", c2.real); + ok(almost_eq(c2.imag, 25.849230), "c2.imag = %g\n", c2.imag); + p_complex_float_pow_fc(&c2, &f1, &c1); + ok(almost_eq(c2.real, 4942.879395), "c2.real = %f\n", c2.real); + ok(almost_eq(c2.imag, 1020.427368), "c2.imag = %g\n", c2.imag); + p_complex_float_pow_cf(&c2, &c1, &f1); + ok(almost_eq(c2.real, 664.453918), "c2.real = %f\n", c2.real); + ok(almost_eq(c2.imag, 52.643879), "c2.imag = %g\n", c2.imag); c1.real = 0.14; c1.imag = 0.19; @@ -843,6 +894,15 @@ static void test_complex(void) p_complex_float_sqrt(&c2, &c1); ok(almost_eq(c2.real, 0.433595), "c2.real = %f\n", c2.real); ok(almost_eq(c2.imag, 0.219099), "c2.imag = %g\n", c2.imag); + p_complex_float_pow_ci(&c2, &c1, r); + ok(almost_eq(c2.real, -0.012418), "c2.real = %f\n", c2.real); + ok(almost_eq(c2.imag, 0.004313), "c2.imag = %g\n", c2.imag); + p_complex_float_pow_fc(&c2, &f1, &c1); + ok(almost_eq(c2.real, 1.152052), "c2.real = %f\n", c2.real); + ok(almost_eq(c2.imag, 0.266751), "c2.imag = %g\n", c2.imag); + p_complex_float_pow_cf(&c2, &c1, &f1); + ok(almost_eq(c2.real, -0.008370), "c2.real = %f\n", c2.real); + ok(almost_eq(c2.imag, 0.00035447), "c2.imag = %g\n", c2.imag); } START_TEST(misc)