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
f0c70050
Commit
f0c70050
authored
Apr 04, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use the log()/logf() implementation from the bundled musl library.
parent
3fad9cac
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
math.c
dlls/msvcrt/math.c
+0
-0
log.c
libs/musl/src/math/log.c
+5
-3
logf.c
libs/musl/src/math/logf.c
+5
-3
No files found.
dlls/msvcrt/math.c
View file @
f0c70050
This diff is collapsed.
Click to expand it.
libs/musl/src/math/log.c
View file @
f0c70050
...
...
@@ -63,11 +63,13 @@ double __cdecl log(double x)
if
(
predict_false
(
top
-
0x0010
>=
0x7ff0
-
0x0010
))
{
/* x < 0x1p-1022 or inf or nan. */
if
(
ix
*
2
==
0
)
return
__math_divzero
(
1
);
return
math_error
(
_SING
,
"log"
,
x
,
0
,
(
top
&
0x8000
?
1
.
0
:
-
1
.
0
)
/
x
);
if
(
ix
==
asuint64
(
INFINITY
))
/* log(inf) == inf. */
return
x
;
if
((
top
&
0x8000
)
||
(
top
&
0x7ff0
)
==
0x7ff0
)
return
__math_invalid
(
x
);
if
((
top
&
0x7ff0
)
==
0x7ff0
&&
(
ix
&
0xfffffffffffffULL
))
return
x
;
if
(
top
&
0x8000
)
return
math_error
(
_DOMAIN
,
"log"
,
x
,
0
,
(
x
-
x
)
/
(
x
-
x
));
/* x is subnormal, normalize it. */
ix
=
asuint64
(
x
*
0x1
p52
);
ix
-=
52ULL
<<
52
;
...
...
libs/musl/src/math/logf.c
View file @
f0c70050
...
...
@@ -37,11 +37,13 @@ float __cdecl logf(float x)
if
(
predict_false
(
ix
-
0x00800000
>=
0x7f800000
-
0x00800000
))
{
/* x < 0x1p-126 or inf or nan. */
if
(
ix
*
2
==
0
)
return
__math_divzerof
(
1
);
return
math_error
(
_SING
,
"logf"
,
x
,
0
,
(
ix
&
0x80000000
?
1
.
0
:
-
1
.
0
)
/
x
);
if
(
ix
==
0x7f800000
)
/* log(inf) == inf. */
return
x
;
if
((
ix
&
0x80000000
)
||
ix
*
2
>=
0xff000000
)
return
__math_invalidf
(
x
);
if
(
ix
*
2
>
0xff000000
)
return
x
;
if
(
ix
&
0x80000000
)
return
math_error
(
_DOMAIN
,
"logf"
,
x
,
0
,
(
x
-
x
)
/
(
x
-
x
));
/* x is subnormal, normalize it. */
ix
=
asuint
(
x
*
0x1
p23f
);
ix
-=
23
<<
23
;
...
...
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