Module: wine Branch: master Commit: be147a806b80c005ed29decab9d4060dfd0d543b URL: https://gitlab.winehq.org/wine/wine/-/commit/be147a806b80c005ed29decab9d4060...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Apr 3 14:38:27 2023 +0200
msvcrt: Use the frexp()/frexpf() implementation from the bundled musl library.
---
dlls/msvcrt/math.c | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-)
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 2bbdcdcc7d3..f32e85a26a8 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -2009,32 +2009,6 @@ float CDECL floorf( float x ) return u.f; }
-/********************************************************************* - * frexpf (MSVCRT.@) - * - * Copied from musl: src/math/frexpf.c - */ -float CDECL frexpf( float x, int *e ) -{ - UINT32 ux = *(UINT32*)&x; - int ee = ux >> 23 & 0xff; - - if (!ee) { - if (x) { - x = frexpf(x * 0x1p64, e); - *e -= 64; - } else *e = 0; - return x; - } else if (ee == 0xff) { - return x; - } - - *e = ee - 0x7e; - ux &= 0x807ffffful; - ux |= 0x3f000000ul; - return *(float*)&ux; -} - /********************************************************************* * modff (MSVCRT.@) * @@ -5079,32 +5053,6 @@ float CDECL fmaf( float x, float y, float z ) return u.f; }
-/********************************************************************* - * frexp (MSVCRT.@) - * - * Copied from musl: src/math/frexp.c - */ -double CDECL frexp( double x, int *e ) -{ - UINT64 ux = *(UINT64*)&x; - int ee = ux >> 52 & 0x7ff; - - if (!ee) { - if (x) { - x = frexp(x * 0x1p64, e); - *e -= 64; - } else *e = 0; - return x; - } else if (ee == 0x7ff) { - return x; - } - - *e = ee - 0x3fe; - ux &= 0x800fffffffffffffull; - ux |= 0x3fe0000000000000ull; - return *(double*)&ux; -} - /********************************************************************* * modf (MSVCRT.@) *