Module: wine Branch: master Commit: 9eb3adbc851733352aa4b7edb401f012290e61b6 URL: https://source.winehq.org/git/wine.git/?a=commit;h=9eb3adbc851733352aa4b7edb...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Oct 26 10:33:47 2021 +0200
ntdll: Copy fabs() implementation from msvcrt.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntdll/math.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/math.c b/dlls/ntdll/math.c index a7d20acdf59..7202897ce1b 100644 --- a/dlls/ntdll/math.c +++ b/dlls/ntdll/math.c @@ -183,10 +183,14 @@ double CDECL cos( double d )
/********************************************************************* * fabs (NTDLL.@) + * + * Copied from musl: src/math/fabsf.c */ -double CDECL fabs( double d ) +double CDECL fabs( double x ) { - return unix_funcs->fabs( d ); + union { double f; UINT64 i; } u = { x }; + u.i &= ~0ull >> 1; + return u.f; }
/*********************************************************************