reactos/lib/sdk/crt/math/frexp.c
Cameron Gutman c2d0d784c7 [USB-BRINGUP-TRUNK]
- Create a branch to do a proper merge of USB work from a trunk base instead of from cmake-bringup
- In the future, DO NOT under any circumstances branch another branch. This leads to merge problems!

svn path=/branches/usb-bringup-trunk/; revision=55018
2012-01-20 20:58:46 +00:00

30 lines
296 B
C

#include <math.h>
#include <stdlib.h>
#include <internal/ieee.h>
/*
* @implemented
*/
double
frexp(double __x, int *exptr)
{
union
{
double* __x;
double_s* x;
} x;
x.__x = &__x;
if ( exptr != NULL )
*exptr = x.x->exponent - 0x3FE;
x.x->exponent = 0x3FE;
return __x;
}