From: Martin Storsjo Subject: [PATCH] msvcrt: Fix the fallback implementation of asinh for large negative values Message-Id: <20190423070004.26622-1-martin@martin.st> Date: Tue, 23 Apr 2019 10:00:04 +0300 Signed-off-by: Martin Storsjo --- dlls/msvcrt/math.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index c893c83a69..21f1f9b9b2 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -3063,7 +3063,10 @@ double CDECL MSVCR120_asinh(double x) #ifdef HAVE_ASINH return asinh(x); #else - if (!isfinite(x*x+1)) return log(2) + log(x); + if (!isfinite(x*x+1)) { + if (x > 0) return log(2) + log(x); + else return -log(2) - log(-x); + } return log(x + sqrt(x*x+1)); #endif } -- 2.17.1