Commit f02ff7f6 authored by YongHao Hu's avatar YongHao Hu Committed by Alexandre Julliard

msvcp90: Added complex_float_pow implementation (fix precision) and tests.

parent 3881adf2
......@@ -440,8 +440,8 @@
@ cdecl -arch=win32 ??$pow@M@std@@YA?AV?$complex@M@0@ABV10@ABM@Z(ptr ptr ptr) msvcp90.??$pow@M@std@@YA?AV?$complex@M@0@ABV10@ABM@Z
@ cdecl -arch=win64 ??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@AEBM@Z(ptr ptr ptr) msvcp90.??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@AEBM@Z
@ stub -arch=win64 ??$pow@M@std@@YA?AV?$complex@M@1@AEBV21@AEBM@Z
@ 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) msvcp90.??$pow@M@std@@YA?AV?$complex@M@0@ABV10@H@Z
@ cdecl -arch=win64 ??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@H@Z(ptr ptr long) msvcp90.??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@H@Z
@ stub -arch=win64 ??$pow@M@std@@YA?AV?$complex@M@1@AEBV21@H@Z
@ cdecl -arch=win32 ??$pow@N@std@@YA?AV?$complex@N@0@ABNABV10@@Z(ptr ptr ptr) msvcp90.??$pow@N@std@@YA?AV?$complex@N@0@ABNABV10@@Z
@ cdecl -arch=win64 ??$pow@N@std@@YA?AV?$complex@N@0@AEBNAEBV10@@Z(ptr ptr ptr) msvcp90.??$pow@N@std@@YA?AV?$complex@N@0@AEBNAEBV10@@Z
......@@ -452,8 +452,8 @@
@ cdecl -arch=win32 ??$pow@N@std@@YA?AV?$complex@N@0@ABV10@ABN@Z(ptr ptr ptr) msvcp90.??$pow@N@std@@YA?AV?$complex@N@0@ABV10@ABN@Z
@ cdecl -arch=win64 ??$pow@N@std@@YA?AV?$complex@N@0@AEBV10@AEBN@Z(ptr ptr ptr) msvcp90.??$pow@N@std@@YA?AV?$complex@N@0@AEBV10@AEBN@Z
@ stub -arch=win64 ??$pow@N@std@@YA?AV?$complex@N@1@AEBV21@AEBN@Z
@ 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) msvcp90.??$pow@N@std@@YA?AV?$complex@N@0@ABV10@H@Z
@ cdecl -arch=win64 ??$pow@N@std@@YA?AV?$complex@N@0@AEBV10@H@Z(ptr ptr long) msvcp90.??$pow@N@std@@YA?AV?$complex@N@0@AEBV10@H@Z
@ stub -arch=win64 ??$pow@N@std@@YA?AV?$complex@N@1@AEBV21@H@Z
@ cdecl -arch=win32 ??$pow@O@std@@YA?AV?$complex@O@0@ABOABV10@@Z(ptr ptr ptr) msvcp90.??$pow@O@std@@YA?AV?$complex@O@0@ABOABV10@@Z
@ cdecl -arch=win64 ??$pow@O@std@@YA?AV?$complex@O@0@AEBOAEBV10@@Z(ptr ptr ptr) msvcp90.??$pow@O@std@@YA?AV?$complex@O@0@AEBOAEBV10@@Z
......@@ -464,8 +464,8 @@
@ cdecl -arch=win32 ??$pow@O@std@@YA?AV?$complex@O@0@ABV10@ABO@Z(ptr ptr ptr) msvcp90.??$pow@O@std@@YA?AV?$complex@O@0@ABV10@ABO@Z
@ cdecl -arch=win64 ??$pow@O@std@@YA?AV?$complex@O@0@AEBV10@AEBO@Z(ptr ptr ptr) msvcp90.??$pow@O@std@@YA?AV?$complex@O@0@AEBV10@AEBO@Z
@ stub -arch=win64 ??$pow@O@std@@YA?AV?$complex@O@1@AEBV21@AEBO@Z
@ 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) msvcp90.??$pow@O@std@@YA?AV?$complex@O@0@ABV10@H@Z
@ cdecl -arch=win64 ??$pow@O@std@@YA?AV?$complex@O@0@AEBV10@H@Z(ptr ptr long) msvcp90.??$pow@O@std@@YA?AV?$complex@O@0@AEBV10@H@Z
@ stub -arch=win64 ??$pow@O@std@@YA?AV?$complex@O@1@AEBV21@H@Z
@ cdecl -arch=win32 ??$real@M@std@@YAMABV?$complex@M@0@@Z(ptr) msvcp90.??$real@M@std@@YAMABV?$complex@M@0@@Z
@ cdecl -arch=win64 ??$real@M@std@@YAMAEBV?$complex@M@0@@Z(ptr) msvcp90.??$real@M@std@@YAMAEBV?$complex@M@0@@Z
......@@ -3615,15 +3615,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) msvcp70.?pow@std@@YA?AV?$complex@M@1@ABV21@H@Z
@ cdecl -arch=win64 ?pow@std@@YA?AV?$complex@M@1@AEBV21@H@Z(ptr ptr long) msvcp70.?pow@std@@YA?AV?$complex@M@1@AEBV21@H@Z
@ 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) msvcp70.?pow@std@@YA?AV?$complex@N@1@AEBV21@AEBN@Z
@ cdecl -arch=win32 ?pow@std@@YA?AV?$complex@N@1@ABV21@H@Z(ptr ptr long) msvcp70.?pow@std@@YA?AV?$complex@N@1@ABV21@H@Z
@ 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
......@@ -3631,8 +3631,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) msvcp70.?pow@std@@YA?AV?$complex@O@1@ABV21@H@Z
@ cdecl -arch=win64 ?pow@std@@YA?AV?$complex@O@1@AEBV21@H@Z(ptr ptr long) msvcp70.?pow@std@@YA?AV?$complex@O@1@AEBV21@H@Z
@ thiscall -arch=win32 ?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=win32 ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ(ptr) basic_streambuf_wchar_pptr
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -1462,6 +1462,29 @@ 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 = *l;
complex_float temp = { 1.0, 0 };
complex_float_assign(ret, &temp);
if(r < 0) {
r = -r;
complex_float_div(&c, &temp, l);
}
for(; r>0; r>>=1) {
if(r & 1)
complex_float_mult_assign(ret, &c);
complex_float_assign(&temp, &c);
complex_float_mult_assign(&c, &temp);
}
return ret;
}
/* ??$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 +2181,31 @@ 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 = *l;
complex_double temp = { 1.0, 0 };
complex_double_assign(ret, &temp);
if(r < 0) {
r = -r;
complex_double_div(&c, &temp, l);
}
for(; r>0; r>>=1) {
if(r & 1)
complex_double_mult_assign(ret, &c);
complex_double_assign(&temp, &c);
complex_double_mult_assign(&c, &temp);
}
return ret;
}
/* ??$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 */
......
......@@ -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
......
......@@ -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,
......@@ -267,6 +270,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");
......@@ -322,6 +331,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");
......@@ -376,6 +391,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
}
......@@ -672,6 +693,7 @@ static void test_complex(void)
complex_float c1, c2, c3;
float f1, f2;
int scale;
int r;
f1 = 1;
f2 = 2;
......@@ -787,6 +809,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);
......@@ -799,6 +823,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;
......@@ -814,6 +847,20 @@ 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);
r = -r;
p_complex_float_pow_ci(&c2, &c1, r);
ok(almost_eq(c2.real, 0.258013), "c2.real = %f\n", c2.real);
ok(c2.imag == 0, "c2.imag = %g\n", c2.imag);
r = -r;
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;
......@@ -829,6 +876,20 @@ 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);
r = -r;
p_complex_float_pow_ci(&c2, &c1, r);
ok(almost_eq(c2.real, 0.002761), "c2.real = %f\n", c2.real);
ok(almost_eq(c2.imag, -0.000198073), "c2.imag = %g\n", c2.imag);
r = -r;
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;
......@@ -844,6 +905,19 @@ 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);
r = -r;
p_complex_float_pow_ci(&c2, &c1, r);
ok(almost_eq(c2.real, -71.859810), "c2.real = %f\n", c2.real);
ok(almost_eq(c2.imag, -24.958229), "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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment