From: Alexandre Julliard julliard@winehq.org
--- dlls/msvcrt/math.c | 76 ---------------------------------------------- 1 file changed, 76 deletions(-)
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index f32e85a26a8..4d8e0e17b6f 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -2009,44 +2009,6 @@ float CDECL floorf( float x ) return u.f; }
-/********************************************************************* - * modff (MSVCRT.@) - * - * Copied from musl: src/math/modff.c - */ -float CDECL modff( float x, float *iptr ) -{ - union {float f; UINT32 i;} u = {x}; - UINT32 mask; - int e = (u.i >> 23 & 0xff) - 0x7f; - - /* no fractional part */ - if (e >= 23) { - *iptr = x; - if (e == 0x80 && u.i << 9 != 0) { /* nan */ - return x; - } - u.i &= 0x80000000; - return u.f; - } - /* no integral part */ - if (e < 0) { - u.i &= 0x80000000; - *iptr = u.f; - return x; - } - - mask = 0x007fffff >> e; - if ((u.i & mask) == 0) { - *iptr = x; - u.i &= 0x80000000; - return u.f; - } - u.i &= ~mask; - *iptr = u.f; - return x - u.f; -} - #endif
/********************************************************************* @@ -5053,44 +5015,6 @@ float CDECL fmaf( float x, float y, float z ) return u.f; }
-/********************************************************************* - * modf (MSVCRT.@) - * - * Copied from musl: src/math/modf.c - */ -double CDECL modf( double x, double *iptr ) -{ - union {double f; UINT64 i;} u = {x}; - UINT64 mask; - int e = (u.i >> 52 & 0x7ff) - 0x3ff; - - /* no fractional part */ - if (e >= 52) { - *iptr = x; - if (e == 0x400 && u.i << 12 != 0) /* nan */ - return x; - u.i &= 1ULL << 63; - return u.f; - } - - /* no integral part*/ - if (e < 0) { - u.i &= 1ULL << 63; - *iptr = u.f; - return x; - } - - mask = -1ULL >> 12 >> e; - if ((u.i & mask) == 0) { - *iptr = x; - u.i &= 1ULL << 63; - return u.f; - } - u.i &= ~mask; - *iptr = u.f; - return x - u.f; -} - #if defined(__i386__) || defined(__x86_64__) static void _setfp_sse( unsigned int *cw, unsigned int cw_mask, unsigned int *sw, unsigned int sw_mask )