Commit 70c3e08d authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp90: Add std:_XLgamma implementation.

parent 18d32bfb
......@@ -1260,9 +1260,9 @@
@ cdecl -arch=win64 ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UEAAXXZ(ptr) basic_streambuf_wchar__Unlock
@ thiscall -arch=win32 ?_Unlock@_Mutex@std@@QAEXXZ(ptr) mutex_unlock
@ cdecl -arch=win64 ?_Unlock@_Mutex@std@@QEAAXXZ(ptr) mutex_unlock
@ stub ?_XLgamma@tr1@std@@YAMM@Z
@ stub ?_XLgamma@tr1@std@@YANN@Z
@ stub ?_XLgamma@tr1@std@@YAOO@Z
@ cdecl ?_XLgamma@tr1@std@@YAMM@Z(float) std__XLgamma_float
@ cdecl ?_XLgamma@tr1@std@@YANN@Z(double) std__XLgamma_double
@ cdecl ?_XLgamma@tr1@std@@YAOO@Z(double) std__XLgamma_double
@ stub ?_Xbad@tr1@std@@YAXW4error_type@regex_constants@12@@Z
@ stub ?_Xfunc@tr1@std@@YAXXZ
@ cdecl -arch=win32 ?_Xinvalid_argument@std@@YAXPBD@Z(str) _Xinvalid_argument
......
......@@ -1829,9 +1829,9 @@
@ stub -arch=win64 ?_W_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ
@ stub -arch=win32 ?_Winerror_map@std@@YAPBDH@Z
@ stub -arch=win64 ?_Winerror_map@std@@YAPEBDH@Z
@ stub ?_XLgamma@std@@YAMM@Z
@ stub ?_XLgamma@std@@YANN@Z
@ stub ?_XLgamma@std@@YAOO@Z
@ cdecl ?_XLgamma@std@@YAMM@Z(float) std__XLgamma_float
@ cdecl ?_XLgamma@std@@YANN@Z(double) std__XLgamma_double
@ cdecl ?_XLgamma@std@@YAOO@Z(double) std__XLgamma_double
@ cdecl ?_Xbad_alloc@std@@YAXXZ() _Xmem
@ stub ?_Xbad_function_call@std@@YAXXZ
@ cdecl -arch=win32 ?_Xinvalid_argument@std@@YAXPBD@Z(str) _Xinvalid_argument
......
......@@ -1790,9 +1790,9 @@
@ stub -arch=win64 ?_W_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ
@ stub -arch=win32 ?_Winerror_map@std@@YAPBDH@Z
@ stub -arch=win64 ?_Winerror_map@std@@YAPEBDH@Z
@ stub ?_XLgamma@std@@YAMM@Z
@ stub ?_XLgamma@std@@YANN@Z
@ stub ?_XLgamma@std@@YAOO@Z
@ cdecl ?_XLgamma@std@@YAMM@Z(float) std__XLgamma_float
@ cdecl ?_XLgamma@std@@YANN@Z(double) std__XLgamma_double
@ cdecl ?_XLgamma@std@@YAOO@Z(double) std__XLgamma_double
@ cdecl ?_Xbad_alloc@std@@YAXXZ() _Xmem
@ stub ?_Xbad_function_call@std@@YAXXZ
@ cdecl -arch=win32 ?_Xinvalid_argument@std@@YAXPBD@Z(str) _Xinvalid_argument
......
......@@ -1790,9 +1790,9 @@
@ stub -arch=win64 ?_W_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ
@ stub -arch=win32 ?_Winerror_map@std@@YAPBDH@Z
@ stub -arch=win64 ?_Winerror_map@std@@YAPEBDH@Z
@ stub ?_XLgamma@std@@YAMM@Z
@ stub ?_XLgamma@std@@YANN@Z
@ stub ?_XLgamma@std@@YAOO@Z
@ cdecl ?_XLgamma@std@@YAMM@Z(float) msvcp120.?_XLgamma@std@@YAMM@Z
@ cdecl ?_XLgamma@std@@YANN@Z(double) msvcp120.?_XLgamma@std@@YANN@Z
@ cdecl ?_XLgamma@std@@YAOO@Z(double) msvcp120.?_XLgamma@std@@YAOO@Z
@ cdecl ?_Xbad_alloc@std@@YAXXZ() msvcp120.?_Xbad_alloc@std@@YAXXZ
@ stub ?_Xbad_function_call@std@@YAXXZ
@ cdecl -arch=win32 ?_Xinvalid_argument@std@@YAXPBD@Z(str) msvcp120.?_Xinvalid_argument@std@@YAXPBD@Z
......
......@@ -1673,9 +1673,9 @@
@ cdecl -arch=win32 ?_Winerror_message@std@@YAKKPADK@Z(long ptr long) _Winerror_message
@ cdecl -arch=win64 ?_Winerror_message@std@@YAKKPEADK@Z(long ptr long) _Winerror_message
@ stub ?_XGetLastError@std@@YAXXZ
@ stub ?_XLgamma@std@@YAMM@Z
@ stub ?_XLgamma@std@@YANN@Z
@ stub ?_XLgamma@std@@YAOO@Z
@ cdecl ?_XLgamma@std@@YAMM@Z(float) std__XLgamma_float
@ cdecl ?_XLgamma@std@@YANN@Z(double) std__XLgamma_double
@ cdecl ?_XLgamma@std@@YAOO@Z(double) std__XLgamma_double
@ cdecl ?_Xbad_alloc@std@@YAXXZ() _Xmem
@ stub ?_Xbad_function_call@std@@YAXXZ
@ cdecl -arch=win32 ?_Xinvalid_argument@std@@YAXPBD@Z(str) _Xinvalid_argument
......
......@@ -2362,3 +2362,36 @@ short __cdecl _FExp(float *x, float y, short scale)
return dclass(*x);
}
/* ?_XLgamma@std@@YANN@Z */
double __cdecl std__XLgamma_double(double z)
{
/* Lanczos coefficients g=5, n=6 */
static const double lc[] = {
1.000000000190015,
76.18009172947146,
-86.50532032941677,
24.01409824083091,
-1.231739572450155,
0.1208650973866179e-2,
-0.5395239384953e-5
};
static const double log_sqrt_2pi = 0.91893853320467274178;
double base = z + 4.5, sum = 0;
int i;
if (z < 0.5) return log(M_PI / sin(M_PI * z)) - std__XLgamma_double(1 - z);
z--;
for(i = ARRAY_SIZE(lc) - 1; i >= 1; i--)
sum += lc[i] / (z + i);
sum += lc[0];
return log_sqrt_2pi + log(sum) - base + log(base) * (z + 0.5);
}
/* ?_XLgamma@tr1@std@@YAMM@Z */
float __cdecl std__XLgamma_float(float z)
{
return std__XLgamma_double(z);
}
......@@ -3185,9 +3185,9 @@
@ cdecl -arch=win64 ?_Widen_s@?$ctype@G@std@@QEBAPEBDPEBD0PEAG_K@Z(ptr ptr ptr ptr long) ctype_wchar__Widen_s
@ thiscall -arch=win32 ?_Widen_s@?$ctype@_W@std@@QBEPBDPBD0PA_WI@Z(ptr ptr ptr ptr long) ctype_wchar__Widen_s
@ cdecl -arch=win64 ?_Widen_s@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W_K@Z(ptr ptr ptr ptr long) ctype_wchar__Widen_s
@ stub ?_XLgamma@tr1@std@@YAMM@Z
@ stub ?_XLgamma@tr1@std@@YANN@Z
@ stub ?_XLgamma@tr1@std@@YAOO@Z
@ cdecl ?_XLgamma@tr1@std@@YAMM@Z(float) std__XLgamma_float
@ cdecl ?_XLgamma@tr1@std@@YANN@Z(double) std__XLgamma_double
@ cdecl ?_XLgamma@tr1@std@@YAOO@Z(double) std__XLgamma_double
@ stub ?_Xbad@tr1@std@@YAXW4error_type@regex_constants@12@@Z
@ stub -arch=win32 ?_Xfsopen@std@@YAPAU_iobuf@@PB_W0H@Z
@ stub -arch=win64 ?_Xfsopen@std@@YAPEAU_iobuf@@PEB_W0H@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