Author: pschweitzer
Date: Sat Nov 19 15:51:45 2011
New Revision: 54440
URL:
http://svn.reactos.org/svn/reactos?rev=54440&view=rev
Log:
[CRT]
Reimplemented _scalb properly.
This fixes 19 tests.
Modified:
trunk/reactos/lib/sdk/crt/float/scalb.c
Modified: trunk/reactos/lib/sdk/crt/float/scalb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/float/scalb.c?…
==============================================================================
--- trunk/reactos/lib/sdk/crt/float/scalb.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/float/scalb.c [iso-8859-1] Sat Nov 19 15:51:45 2011
@@ -1,30 +1,17 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
- * FILE: lib/crt/??????
- * PURPOSE: Unknown
- * PROGRAMER: Unknown
- * UPDATE HISTORY:
- * 25/11/05: Added license header
+ * FILE: lib/sdk/crt/float/scalb.c
+ * PURPOSE: Floating-point number scaling
+ * PROGRAMER: Pierre Schweitzer (pierre(a)reactos.org)
*/
#include <precomp.h>
-#include <internal/ieee.h>
/*
* @implemented
*/
-double _scalb( double __x, long e )
+double _scalb(double x, long exp)
{
- union
- {
- double* __x;
- double_s* x;
- } x;
-
- x.__x = &__x;
-
- x.x->exponent += e;
-
- return __x;
+ return ldexp(x, exp);
}