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
81c58e7d
Commit
81c58e7d
authored
Jun 03, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
Jun 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Import frexp implementation from musl.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
aeeda123
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
12 deletions
+20
-12
math.c
dlls/msvcrt/math.c
+20
-2
unixlib.c
dlls/msvcrt/unixlib.c
+0
-9
unixlib.h
dlls/msvcrt/unixlib.h
+0
-1
No files found.
dlls/msvcrt/math.c
View file @
81c58e7d
...
...
@@ -3494,10 +3494,28 @@ double CDECL fabs( double x )
/*********************************************************************
* frexp (MSVCRT.@)
*
* Copied from musl: src/math/frexp.c
*/
double
CDECL
frexp
(
double
x
,
int
*
e
xp
)
double
CDECL
frexp
(
double
x
,
int
*
e
)
{
return
unix_funcs
->
frexp
(
x
,
exp
);
UINT64
ux
=
*
(
UINT64
*
)
&
x
;
int
ee
=
ux
>>
52
&
0x7ff
;
if
(
!
ee
)
{
if
(
x
)
{
x
=
frexp
(
x
*
0x1
p64
,
e
);
*
e
-=
64
;
}
else
*
e
=
0
;
return
x
;
}
else
if
(
ee
==
0x7ff
)
{
return
x
;
}
*
e
=
ee
-
0x3fe
;
ux
&=
0x800fffffffffffffull
;
ux
|=
0x3fe0000000000000ull
;
return
*
(
double
*
)
&
ux
;
}
/*********************************************************************
...
...
dlls/msvcrt/unixlib.c
View file @
81c58e7d
...
...
@@ -95,14 +95,6 @@ static float CDECL unix_fmaf( float x, float y, float z )
}
/*********************************************************************
* frexp
*/
static
double
CDECL
unix_frexp
(
double
x
,
int
*
exp
)
{
return
frexp
(
x
,
exp
);
}
/*********************************************************************
* frexpf
*/
static
float
CDECL
unix_frexpf
(
float
x
,
int
*
exp
)
...
...
@@ -281,7 +273,6 @@ static const struct unix_funcs funcs =
unix_exp2
,
unix_exp2f
,
unix_fmaf
,
unix_frexp
,
unix_frexpf
,
unix_hypot
,
unix_hypotf
,
...
...
dlls/msvcrt/unixlib.h
View file @
81c58e7d
...
...
@@ -28,7 +28,6 @@ struct unix_funcs
double
(
CDECL
*
exp2
)(
double
x
);
float
(
CDECL
*
exp2f
)(
float
x
);
float
(
CDECL
*
fmaf
)(
float
x
,
float
y
,
float
z
);
double
(
CDECL
*
frexp
)(
double
x
,
int
*
exp
);
float
(
CDECL
*
frexpf
)(
float
x
,
int
*
exp
);
double
(
CDECL
*
hypot
)(
double
x
,
double
y
);
float
(
CDECL
*
hypotf
)(
float
x
,
float
y
);
...
...
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