Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9d2de96d
Commit
9d2de96d
authored
Jun 14, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
Jun 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Fix math error arguments in powf.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a5cec4f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
math.c
dlls/msvcrt/math.c
+4
-4
No files found.
dlls/msvcrt/math.c
View file @
9d2de96d
...
...
@@ -1567,7 +1567,7 @@ float CDECL powf( float x, float y )
if
(
ix
&
0x80000000
&&
powf_checkint
(
iy
)
==
1
)
x2
=
-
x2
;
if
(
iy
&
0x80000000
&&
x2
==
0
.
0
)
return
math_error
(
_SING
,
"powf"
,
x
,
0
,
1
/
x2
);
return
math_error
(
_SING
,
"powf"
,
x
,
y
,
1
/
x2
);
/* Without the barrier some versions of clang hoist the 1/x2 and
thus division by zero exception can be signaled spuriously. */
return
iy
&
0x80000000
?
fp_barrierf
(
1
/
x2
)
:
x2
;
...
...
@@ -1577,7 +1577,7 @@ float CDECL powf( float x, float y )
/* Finite x < 0. */
int
yint
=
powf_checkint
(
iy
);
if
(
yint
==
0
)
return
math_error
(
_DOMAIN
,
"powf"
,
x
,
0
,
0
/
(
x
-
x
));
return
math_error
(
_DOMAIN
,
"powf"
,
x
,
y
,
0
/
(
x
-
x
));
if
(
yint
==
1
)
sign_bias
=
1
<<
(
5
+
11
);
ix
&=
0x7fffffff
;
...
...
@@ -1595,9 +1595,9 @@ float CDECL powf( float x, float y )
if
((
*
(
UINT64
*
)
&
ylogx
>>
47
&
0xffff
)
>=
0x40af800000000000llu
>>
47
)
{
/* |y*log(x)| >= 126. */
if
(
ylogx
>
0x1
.
fffffffd1d571p
+
6
*
(
1
<<
5
))
return
math_error
(
_OVERFLOW
,
"powf"
,
x
,
0
,
(
sign_bias
?
-
1
.
0
:
1
.
0
)
*
0x1
p1023
);
return
math_error
(
_OVERFLOW
,
"powf"
,
x
,
y
,
(
sign_bias
?
-
1
.
0
:
1
.
0
)
*
0x1
p1023
);
if
(
ylogx
<=
-
150
.
0
*
(
1
<<
5
))
return
math_error
(
_UNDERFLOW
,
"powf"
,
x
,
0
,
(
sign_bias
?
-
1
.
0
:
1
.
0
)
/
0x1
p1023
);
return
math_error
(
_UNDERFLOW
,
"powf"
,
x
,
y
,
(
sign_bias
?
-
1
.
0
:
1
.
0
)
/
0x1
p1023
);
}
return
powf_exp2
(
ylogx
,
sign_bias
);
}
...
...
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