Reimplemented _scalb properly.
This fixes 19 tests.

svn path=/trunk/; revision=54440
This commit is contained in:
Pierre Schweitzer 2011-11-19 15:51:45 +00:00
parent f3942a15e7
commit 531147c111

View file

@ -1,30 +1,17 @@
/* /*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
* FILE: lib/crt/?????? * FILE: lib/sdk/crt/float/scalb.c
* PURPOSE: Unknown * PURPOSE: Floating-point number scaling
* PROGRAMER: Unknown * PROGRAMER: Pierre Schweitzer (pierre@reactos.org)
* UPDATE HISTORY:
* 25/11/05: Added license header
*/ */
#include <precomp.h> #include <precomp.h>
#include <internal/ieee.h>
/* /*
* @implemented * @implemented
*/ */
double _scalb( double __x, long e ) double _scalb(double x, long exp)
{ {
union return ldexp(x, exp);
{
double* __x;
double_s* x;
} x;
x.__x = &__x;
x.x->exponent += e;
return __x;
} }