mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 19:26:33 +00:00
fix the build after me
svn path=/trunk/; revision=21940
This commit is contained in:
@@ -33,6 +33,10 @@ double linkme_log2(double __x)
|
||||
return 0;
|
||||
}
|
||||
|
||||
double linkme_fmod(double __x, double __y)
|
||||
{
|
||||
return fmod(__x, __y);
|
||||
}
|
||||
|
||||
double linkme_sqrt(double __x)
|
||||
{
|
||||
|
||||
@@ -14,74 +14,6 @@
|
||||
|
||||
//static const double one = 1.0;
|
||||
|
||||
double modf(double __x, double *__i)
|
||||
{
|
||||
union
|
||||
{
|
||||
double* __x;
|
||||
double_t* x;
|
||||
} x;
|
||||
union
|
||||
{
|
||||
double* __i;
|
||||
double_t* iptr;
|
||||
} iptr;
|
||||
|
||||
int j0;
|
||||
unsigned int i;
|
||||
|
||||
x.__x = &__x;
|
||||
iptr.__i = __i;
|
||||
|
||||
|
||||
j0 = x.x->exponent - 0x3ff; /* exponent of x */
|
||||
if(j0<20) { /* integer part in high x */
|
||||
if(j0<0) { /* |x|<1 */
|
||||
*__i = 0.0;
|
||||
iptr.iptr->sign = x.x->sign;
|
||||
return __x;
|
||||
} else {
|
||||
|
||||
if ( x.x->mantissah == 0 && x.x->mantissal == 0 ) {
|
||||
*__i = __x;
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
i = (0x000fffff)>>j0;
|
||||
iptr.iptr->sign = x.x->sign;
|
||||
iptr.iptr->exponent = x.x->exponent;
|
||||
iptr.iptr->mantissah = x.x->mantissah&(~i);
|
||||
iptr.iptr->mantissal = 0;
|
||||
if ( __x == *__i ) {
|
||||
__x = 0.0;
|
||||
x.x->sign = iptr.iptr->sign;
|
||||
return __x;
|
||||
}
|
||||
return __x - *__i;
|
||||
}
|
||||
} else if (j0>51) { /* no fraction part */
|
||||
*__i = __x;
|
||||
if ( _isnan(__x) || _isinf(__x) )
|
||||
return __x;
|
||||
|
||||
__x = 0.0;
|
||||
x.x->sign = iptr.iptr->sign;
|
||||
return __x;
|
||||
} else { /* fraction part in low x */
|
||||
|
||||
i = ((unsigned)(0xffffffff))>>(j0-20);
|
||||
iptr.iptr->sign = x.x->sign;
|
||||
iptr.iptr->exponent = x.x->exponent;
|
||||
iptr.iptr->mantissah = x.x->mantissah;
|
||||
iptr.iptr->mantissal = x.x->mantissal&(~i);
|
||||
if ( __x == *__i ) {
|
||||
__x = 0.0;
|
||||
x.x->sign = iptr.iptr->sign;
|
||||
return __x;
|
||||
}
|
||||
return __x - *__i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
long double modfl(long double __x, long double *__i)
|
||||
|
||||
Reference in New Issue
Block a user