msvcp90: Added std::abs(complex) implementation.

This commit is contained in:
Piotr Caban 2013-01-24 12:27:57 +01:00 committed by Alexandre Julliard
parent e4525224b0
commit 3e9db55b09
2 changed files with 70 additions and 12 deletions

View File

@ -1276,6 +1276,33 @@ float __thiscall complex_float_real_get(const complex_float *this)
return this->real;
}
/* ??$_Fabs@M@std@@YAMABV?$complex@M@0@PAH@Z */
/* ??$_Fabs@M@std@@YAMAEBV?$complex@M@0@PEAH@Z */
float __cdecl complex_float__Fabs(const complex_float *c, int *scale)
{
float ret;
ret = hypotf(c->real, c->imag);
if(_isnan(ret) || ret==0) {
*scale = 0;
}else if(ret >= 1) {
*scale = 2;
ret /= 4;
}else {
*scale = -2;
ret *= 4;
}
return ret;
}
/* ??$abs@M@std@@YAMABV?$complex@M@0@@Z */
/* ??$abs@M@std@@YAMAEBV?$complex@M@0@@Z */
float __cdecl complex_float_abs(const complex_float *c)
{
return hypotf(c->real, c->imag);
}
/* ??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 */
@ -1742,3 +1769,34 @@ double __thiscall complex_double_real_get(const complex_double *this)
{
return this->real;
}
/* ??$_Fabs@N@std@@YANABV?$complex@N@0@PAH@Z */
/* ??$_Fabs@N@std@@YANAEBV?$complex@N@0@PEAH@Z */
/* ??$_Fabs@O@std@@YAOABV?$complex@O@0@PAH@Z */
/* ??$_Fabs@O@std@@YAOAEBV?$complex@O@0@PEAH@Z */
double __cdecl complex_double__Fabs(const complex_double *c, int *scale)
{
double ret;
ret = hypot(c->real, c->imag);
if(_isnan(ret) || ret==0) {
*scale = 0;
}else if(ret >= 1) {
*scale = 2;
ret /= 4;
}else {
*scale = -2;
ret *= 4;
}
return ret;
}
/* ??$abs@N@std@@YANABV?$complex@N@0@@Z */
/* ??$abs@N@std@@YANAEBV?$complex@N@0@@Z */
/* ??$abs@O@std@@YAOABV?$complex@O@0@@Z */
/* ??$abs@O@std@@YAOAEBV?$complex@O@0@@Z */
double __cdecl complex_double_abs(const complex_double *c)
{
return hypot(c->real, c->imag);
}

View File

@ -344,18 +344,18 @@
@ cdecl -arch=win64 ??$?P_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PEB_W@Z(ptr wstr) MSVCP_basic_string_wchar_geq_bstr_cstr
@ cdecl -arch=win32 ??$?P_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPB_WABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z(wstr ptr) MSVCP_basic_string_wchar_geq_cstr_bstr
@ cdecl -arch=win64 ??$?P_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPEB_WAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z(wstr ptr) MSVCP_basic_string_wchar_geq_cstr_bstr
@ stub -arch=win32 ??$_Fabs@M@std@@YAMABV?$complex@M@0@PAH@Z
@ stub -arch=win64 ??$_Fabs@M@std@@YAMAEBV?$complex@M@0@PEAH@Z
@ stub -arch=win32 ??$_Fabs@N@std@@YANABV?$complex@N@0@PAH@Z
@ stub -arch=win64 ??$_Fabs@N@std@@YANAEBV?$complex@N@0@PEAH@Z
@ stub -arch=win32 ??$_Fabs@O@std@@YAOABV?$complex@O@0@PAH@Z
@ stub -arch=win64 ??$_Fabs@O@std@@YAOAEBV?$complex@O@0@PEAH@Z
@ stub -arch=win32 ??$abs@M@std@@YAMABV?$complex@M@0@@Z
@ stub -arch=win64 ??$abs@M@std@@YAMAEBV?$complex@M@0@@Z
@ stub -arch=win32 ??$abs@N@std@@YANABV?$complex@N@0@@Z
@ stub -arch=win64 ??$abs@N@std@@YANAEBV?$complex@N@0@@Z
@ stub -arch=win32 ??$abs@O@std@@YAOABV?$complex@O@0@@Z
@ stub -arch=win64 ??$abs@O@std@@YAOAEBV?$complex@O@0@@Z
@ cdecl -arch=win32 ??$_Fabs@M@std@@YAMABV?$complex@M@0@PAH@Z(ptr ptr) complex_float__Fabs
@ cdecl -arch=win64 ??$_Fabs@M@std@@YAMAEBV?$complex@M@0@PEAH@Z(ptr ptr) complex_float__Fabs
@ cdecl -arch=win32 ??$_Fabs@N@std@@YANABV?$complex@N@0@PAH@Z(ptr ptr) complex_double__Fabs
@ cdecl -arch=win64 ??$_Fabs@N@std@@YANAEBV?$complex@N@0@PEAH@Z(ptr ptr) complex_double__Fabs
@ cdecl -arch=win32 ??$_Fabs@O@std@@YAOABV?$complex@O@0@PAH@Z(ptr ptr) complex_double__Fabs
@ cdecl -arch=win64 ??$_Fabs@O@std@@YAOAEBV?$complex@O@0@PEAH@Z(ptr ptr) complex_double__Fabs
@ cdecl -arch=win32 ??$abs@M@std@@YAMABV?$complex@M@0@@Z(ptr) complex_float_abs
@ cdecl -arch=win64 ??$abs@M@std@@YAMAEBV?$complex@M@0@@Z(ptr) complex_float_abs
@ cdecl -arch=win32 ??$abs@N@std@@YANABV?$complex@N@0@@Z(ptr) complex_double_abs
@ cdecl -arch=win64 ??$abs@N@std@@YANAEBV?$complex@N@0@@Z(ptr) complex_double_abs
@ cdecl -arch=win32 ??$abs@O@std@@YAOABV?$complex@O@0@@Z(ptr) complex_double_abs
@ cdecl -arch=win64 ??$abs@O@std@@YAOAEBV?$complex@O@0@@Z(ptr) complex_double_abs
@ cdecl -arch=win32 ??$arg@M@std@@YAMABV?$complex@M@0@@Z(ptr) complex_float_arg
@ cdecl -arch=win64 ??$arg@M@std@@YAMAEBV?$complex@M@0@@Z(ptr) complex_float_arg
@ cdecl -arch=win32 ??$arg@N@std@@YANABV?$complex@N@0@@Z(ptr) complex_double_arg