You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 2b76b9f234eb5d4753337d8b080f2c050daae3ff.
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
From 2712050d88f9b75e0b10e845d1ad21809a9d6dae Mon Sep 17 00:00:00 2001
|
||||
From 478753ef290789114c84c9c7a037206e4d5443f0 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 10 Apr 2015 07:51:16 +0200
|
||||
Subject: msvcrt: Calculate sinh/cosh/exp/pow with higher precision. (v2)
|
||||
Subject: [PATCH] msvcrt: Calculate sinh/cosh/exp/pow with higher precision.
|
||||
(v2)
|
||||
|
||||
Based on a patch by Zheng Chen.
|
||||
---
|
||||
dlls/msvcrt/math.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++----
|
||||
1 file changed, 59 insertions(+), 4 deletions(-)
|
||||
dlls/msvcrt/math.c | 61 +++++++++++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 58 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
|
||||
index 60ce4e659f5..140bf08828b 100644
|
||||
index 59b6a984878..11ba649a947 100644
|
||||
--- a/dlls/msvcrt/math.c
|
||||
+++ b/dlls/msvcrt/math.c
|
||||
@@ -64,6 +64,61 @@ static MSVCRT_matherr_func MSVCRT_default_matherr_func = NULL;
|
||||
@@ -69,6 +69,61 @@ static MSVCRT_matherr_func MSVCRT_default_matherr_func = NULL;
|
||||
static BOOL sse2_supported;
|
||||
static BOOL sse2_enabled;
|
||||
|
||||
@@ -74,42 +75,33 @@ index 60ce4e659f5..140bf08828b 100644
|
||||
void msvcrt_init_math(void)
|
||||
{
|
||||
sse2_supported = sse2_enabled = IsProcessorFeaturePresent( PF_XMMI64_INSTRUCTIONS_AVAILABLE );
|
||||
@@ -478,7 +533,7 @@ double CDECL MSVCRT_cos( double x )
|
||||
@@ -557,7 +612,7 @@ double CDECL MSVCRT_cos( double x )
|
||||
*/
|
||||
double CDECL MSVCRT_cosh( double x )
|
||||
{
|
||||
- double ret = cosh(x);
|
||||
+ double ret = precise_cosh(x);
|
||||
if (isnan(x)) math_error(_DOMAIN, "cosh", x, 0, ret);
|
||||
if (isnan(x)) return math_error(_DOMAIN, "cosh", x, 0, ret);
|
||||
return ret;
|
||||
}
|
||||
@@ -488,7 +543,7 @@ double CDECL MSVCRT_cosh( double x )
|
||||
@@ -567,7 +622,7 @@ double CDECL MSVCRT_cosh( double x )
|
||||
*/
|
||||
double CDECL MSVCRT_exp( double x )
|
||||
{
|
||||
- double ret = exp(x);
|
||||
+ double ret = precise_exp(x);
|
||||
if (isnan(x)) math_error(_DOMAIN, "exp", x, 0, ret);
|
||||
else if (isfinite(x) && !ret) math_error(_UNDERFLOW, "exp", x, 0, ret);
|
||||
else if (isfinite(x) && !isfinite(ret)) math_error(_OVERFLOW, "exp", x, 0, ret);
|
||||
@@ -532,7 +587,7 @@ double CDECL MSVCRT_log10( double x )
|
||||
*/
|
||||
double CDECL MSVCRT_pow( double x, double y )
|
||||
{
|
||||
- double z = pow(x,y);
|
||||
+ double z = precise_pow(x,y);
|
||||
if (x < 0 && y != floor(y)) math_error(_DOMAIN, "pow", x, y, z);
|
||||
else if (!x && isfinite(y) && y < 0) math_error(_SING, "pow", x, y, z);
|
||||
else if (isfinite(x) && isfinite(y) && !isfinite(z)) math_error(_OVERFLOW, "pow", x, y, z);
|
||||
@@ -555,7 +610,7 @@ double CDECL MSVCRT_sin( double x )
|
||||
if (isnan(x)) return math_error(_DOMAIN, "exp", x, 0, ret);
|
||||
if (isfinite(x) && !ret) return math_error(_UNDERFLOW, "exp", x, 0, ret);
|
||||
if (isfinite(x) && !isfinite(ret)) return math_error(_OVERFLOW, "exp", x, 0, ret);
|
||||
@@ -638,7 +693,7 @@ double CDECL MSVCRT_sin( double x )
|
||||
*/
|
||||
double CDECL MSVCRT_sinh( double x )
|
||||
{
|
||||
- double ret = sinh(x);
|
||||
+ double ret = precise_sinh(x);
|
||||
if (isnan(x)) math_error(_DOMAIN, "sinh", x, 0, ret);
|
||||
if (isnan(x)) return math_error(_DOMAIN, "sinh", x, 0, ret);
|
||||
return ret;
|
||||
}
|
||||
--
|
||||
2.14.1
|
||||
2.27.0
|
||||
|
||||
|
Reference in New Issue
Block a user