mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 07:32:57 +00:00
fix the build after me
svn path=/trunk/; revision=21940
This commit is contained in:
parent
83940cb028
commit
aa195e970d
2 changed files with 4 additions and 68 deletions
|
@ -33,6 +33,10 @@ double linkme_log2(double __x)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double linkme_fmod(double __x, double __y)
|
||||||
|
{
|
||||||
|
return fmod(__x, __y);
|
||||||
|
}
|
||||||
|
|
||||||
double linkme_sqrt(double __x)
|
double linkme_sqrt(double __x)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,74 +14,6 @@
|
||||||
|
|
||||||
//static const double one = 1.0;
|
//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)
|
long double modfl(long double __x, long double *__i)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue