From aa195e970dbfd68a8acafea8f30dbe6c2d6ce96a Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Fri, 19 May 2006 00:13:28 +0000 Subject: [PATCH] fix the build after me svn path=/trunk/; revision=21940 --- reactos/lib/crt/math/math.c | 4 +++ reactos/lib/crt/math/modf.c | 68 ------------------------------------- 2 files changed, 4 insertions(+), 68 deletions(-) diff --git a/reactos/lib/crt/math/math.c b/reactos/lib/crt/math/math.c index dd5521ac9cd..ff1d0e266f9 100644 --- a/reactos/lib/crt/math/math.c +++ b/reactos/lib/crt/math/math.c @@ -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) { diff --git a/reactos/lib/crt/math/modf.c b/reactos/lib/crt/math/modf.c index 34849fcac37..72b937c36d5 100644 --- a/reactos/lib/crt/math/modf.c +++ b/reactos/lib/crt/math/modf.c @@ -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)