Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f12bcfd2
Commit
f12bcfd2
authored
Jan 31, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
Feb 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Fix fmaf not to depend on rounding mode.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9fea10cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
math.c
dlls/msvcrt/math.c
+10
-6
No files found.
dlls/msvcrt/math.c
View file @
f12bcfd2
...
...
@@ -5058,8 +5058,8 @@ double CDECL fma( double x, double y, double z )
float
CDECL
fmaf
(
float
x
,
float
y
,
float
z
)
{
union
{
double
f
;
UINT64
i
;
}
u
;
double
xy
,
adjust
;
int
e
;
double
xy
,
err
;
int
e
,
neg
;
xy
=
(
double
)
x
*
y
;
u
.
f
=
xy
+
z
;
...
...
@@ -5083,11 +5083,15 @@ float CDECL fmaf( float x, float y, float z )
* If result is inexact, and exactly halfway between two float values,
* we need to adjust the low-order bit in the direction of the error.
*/
_controlfp
(
_RC_CHOP
,
_MCW_RC
);
adjust
=
fp_barrier
(
xy
+
z
);
_controlfp
(
_RC_NEAR
,
_MCW_RC
);
if
(
u
.
f
==
adjust
)
neg
=
u
.
i
>>
63
;
if
(
neg
==
(
z
>
xy
))
err
=
xy
-
u
.
f
+
z
;
else
err
=
z
-
u
.
f
+
xy
;
if
(
neg
==
(
err
<
0
))
u
.
i
++
;
else
u
.
i
--
;
return
u
.
f
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment