Commit 85da8da3 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Use __scalbn helper in ldexp implementation.

parent 135ae49f
......@@ -3472,14 +3472,12 @@ int * CDECL __fpecode(void)
*/
double CDECL ldexp(double num, int exp)
{
double z = unix_funcs->ldexp(num,exp);
double z = __scalbn(num, exp);
if (isfinite(num) && !isfinite(z))
return math_error(_OVERFLOW, "ldexp", num, exp, z);
if (num && isfinite(num) && !z)
return math_error(_UNDERFLOW, "ldexp", num, exp, z);
if (z == 0 && signbit(z))
z = 0.0; /* Convert -0 -> +0 */
return z;
}
......
......@@ -139,14 +139,6 @@ static float CDECL unix_hypotf(float x, float y)
}
/*********************************************************************
* ldexp
*/
static double CDECL unix_ldexp(double num, int exp)
{
return ldexp( num, exp );
}
/*********************************************************************
* lgamma
*/
static double CDECL unix_lgamma(double x)
......@@ -306,7 +298,6 @@ static const struct unix_funcs funcs =
unix_frexpf,
unix_hypot,
unix_hypotf,
unix_ldexp,
unix_lgamma,
unix_lgammaf,
unix_log,
......
......@@ -33,7 +33,6 @@ struct unix_funcs
float (CDECL *frexpf)(float x, int *exp);
double (CDECL *hypot)(double x, double y);
float (CDECL *hypotf)(float x, float y);
double (CDECL *ldexp)(double x, int exp);
double (CDECL *lgamma)(double x);
float (CDECL *lgammaf)(float x);
double (CDECL *log)(double x);
......
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