Commit 2350e48f authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp90: Added std::norm(complex) and std::polar(complex) implementation.

parent 690e3268
......@@ -1402,6 +1402,31 @@ complex_float* __cdecl complex_float_log10(complex_float *ret, const complex_flo
return ret;
}
/* ??$norm@M@std@@YAMABV?$complex@M@0@@Z */
/* ??$norm@M@std@@YAMAEBV?$complex@M@0@@Z */
float __cdecl complex_float_norm(const complex_float *c)
{
return c->real*c->real + c->imag*c->imag;
}
/* ??$polar@M@std@@YA?AV?$complex@M@0@ABM0@Z */
/* ??$polar@M@std@@YA?AV?$complex@M@0@AEBM0@Z */
complex_float* __cdecl complex_float_polar_theta(complex_float *ret, const float *mod, const float *theta)
{
ret->real = *mod * cos(*theta);
ret->imag = *mod * sin(*theta);
return ret;
}
/* ??$polar@M@std@@YA?AV?$complex@M@0@ABM@Z */
/* ??$polar@M@std@@YA?AV?$complex@M@0@AEBM@Z */
complex_float* __cdecl complex_float_polar(complex_float *ret, const float *mod)
{
ret->real = *mod;
ret->imag = 0;
return ret;
}
/* ??0?$_Complex_base@NU_C_double_complex@@@std@@QAE@ABN0@Z */
/* ??0?$_Complex_base@NU_C_double_complex@@@std@@QEAA@AEBN0@Z */
/* ??0?$_Complex_base@OU_C_ldouble_complex@@@std@@QAE@ABO0@Z */
......@@ -2017,3 +2042,34 @@ complex_double* __cdecl complex_double_log10(complex_double *ret, const complex_
ret->imag *= M_LOG10E;
return ret;
}
/* ??$norm@N@std@@YANABV?$complex@N@0@@Z */
/* ??$norm@N@std@@YANAEBV?$complex@N@0@@Z */
/* ??$norm@O@std@@YAOABV?$complex@O@0@@Z */
/* ??$norm@O@std@@YAOAEBV?$complex@O@0@@Z */
double __cdecl complex_double_norm(const complex_double *c)
{
return c->real*c->real + c->imag*c->imag;
}
/* ??$polar@N@std@@YA?AV?$complex@N@0@ABN0@Z */
/* ??$polar@N@std@@YA?AV?$complex@N@0@AEBN0@Z */
/* ??$polar@O@std@@YA?AV?$complex@O@0@ABO0@Z */
/* ??$polar@O@std@@YA?AV?$complex@O@0@AEBO0@Z */
complex_double* __cdecl complex_double_polar_theta(complex_double *ret, const double *mod, const double *theta)
{
ret->real = *mod * cos(*theta);
ret->imag = *mod * sin(*theta);
return ret;
}
/* ??$polar@N@std@@YA?AV?$complex@N@0@ABN@Z */
/* ??$polar@N@std@@YA?AV?$complex@N@0@AEBN@Z */
/* ??$polar@O@std@@YA?AV?$complex@O@0@ABO@Z */
/* ??$polar@O@std@@YA?AV?$complex@O@0@AEBO@Z */
complex_double* __cdecl complex_double_polar(complex_double *ret, const double *mod)
{
ret->real = *mod;
ret->imag = 0;
return ret;
}
......@@ -416,24 +416,24 @@
@ cdecl -arch=win64 ??$log@N@std@@YA?AV?$complex@N@0@AEBV10@@Z(ptr ptr) complex_double_log
@ cdecl -arch=win32 ??$log@O@std@@YA?AV?$complex@O@0@ABV10@@Z(ptr ptr) complex_double_log
@ cdecl -arch=win64 ??$log@O@std@@YA?AV?$complex@O@0@AEBV10@@Z(ptr ptr) complex_double_log
@ stub -arch=win32 ??$norm@M@std@@YAMABV?$complex@M@0@@Z
@ stub -arch=win64 ??$norm@M@std@@YAMAEBV?$complex@M@0@@Z
@ stub -arch=win32 ??$norm@N@std@@YANABV?$complex@N@0@@Z
@ stub -arch=win64 ??$norm@N@std@@YANAEBV?$complex@N@0@@Z
@ stub -arch=win32 ??$norm@O@std@@YAOABV?$complex@O@0@@Z
@ stub -arch=win64 ??$norm@O@std@@YAOAEBV?$complex@O@0@@Z
@ stub -arch=win32 ??$polar@M@std@@YA?AV?$complex@M@0@ABM0@Z
@ stub -arch=win64 ??$polar@M@std@@YA?AV?$complex@M@0@AEBM0@Z
@ stub -arch=win32 ??$polar@M@std@@YA?AV?$complex@M@0@ABM@Z
@ stub -arch=win64 ??$polar@M@std@@YA?AV?$complex@M@0@AEBM@Z
@ stub -arch=win32 ??$polar@N@std@@YA?AV?$complex@N@0@ABN0@Z
@ stub -arch=win64 ??$polar@N@std@@YA?AV?$complex@N@0@AEBN0@Z
@ stub -arch=win32 ??$polar@N@std@@YA?AV?$complex@N@0@ABN@Z
@ stub -arch=win64 ??$polar@N@std@@YA?AV?$complex@N@0@AEBN@Z
@ stub -arch=win32 ??$polar@O@std@@YA?AV?$complex@O@0@ABO0@Z
@ stub -arch=win64 ??$polar@O@std@@YA?AV?$complex@O@0@AEBO0@Z
@ stub -arch=win32 ??$polar@O@std@@YA?AV?$complex@O@0@ABO@Z
@ stub -arch=win64 ??$polar@O@std@@YA?AV?$complex@O@0@AEBO@Z
@ cdecl -arch=win32 ??$norm@M@std@@YAMABV?$complex@M@0@@Z(ptr) complex_float_norm
@ cdecl -arch=win64 ??$norm@M@std@@YAMAEBV?$complex@M@0@@Z(ptr) complex_float_norm
@ cdecl -arch=win32 ??$norm@N@std@@YANABV?$complex@N@0@@Z(ptr) complex_double_norm
@ cdecl -arch=win64 ??$norm@N@std@@YANAEBV?$complex@N@0@@Z(ptr) complex_double_norm
@ cdecl -arch=win32 ??$norm@O@std@@YAOABV?$complex@O@0@@Z(ptr) complex_double_norm
@ cdecl -arch=win64 ??$norm@O@std@@YAOAEBV?$complex@O@0@@Z(ptr) complex_double_norm
@ cdecl -arch=win32 ??$polar@M@std@@YA?AV?$complex@M@0@ABM0@Z(ptr ptr ptr) complex_float_polar_theta
@ cdecl -arch=win64 ??$polar@M@std@@YA?AV?$complex@M@0@AEBM0@Z(ptr ptr ptr) complex_float_polar_theta
@ cdecl -arch=win32 ??$polar@M@std@@YA?AV?$complex@M@0@ABM@Z(ptr ptr) complex_float_polar
@ cdecl -arch=win64 ??$polar@M@std@@YA?AV?$complex@M@0@AEBM@Z(ptr ptr) complex_float_polar
@ cdecl -arch=win32 ??$polar@N@std@@YA?AV?$complex@N@0@ABN0@Z(ptr ptr ptr) complex_double_polar_theta
@ cdecl -arch=win64 ??$polar@N@std@@YA?AV?$complex@N@0@AEBN0@Z(ptr ptr ptr) complex_double_polar_theta
@ cdecl -arch=win32 ??$polar@N@std@@YA?AV?$complex@N@0@ABN@Z(ptr ptr) complex_double_polar
@ cdecl -arch=win64 ??$polar@N@std@@YA?AV?$complex@N@0@AEBN@Z(ptr ptr) complex_double_polar
@ cdecl -arch=win32 ??$polar@O@std@@YA?AV?$complex@O@0@ABO0@Z(ptr ptr ptr) complex_double_polar_theta
@ cdecl -arch=win64 ??$polar@O@std@@YA?AV?$complex@O@0@AEBO0@Z(ptr ptr ptr) complex_double_polar_theta
@ cdecl -arch=win32 ??$polar@O@std@@YA?AV?$complex@O@0@ABO@Z(ptr ptr) complex_double_polar
@ cdecl -arch=win64 ??$polar@O@std@@YA?AV?$complex@O@0@AEBO@Z(ptr ptr) complex_double_polar
@ stub -arch=win32 ??$pow@M@std@@YA?AV?$complex@M@0@ABMABV10@@Z
@ stub -arch=win64 ??$pow@M@std@@YA?AV?$complex@M@0@AEBMAEBV10@@Z
@ stub -arch=win32 ??$pow@M@std@@YA?AV?$complex@M@0@ABV10@0@Z
......
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