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
e5808e20
Commit
e5808e20
authored
Apr 03, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use the modf()/modff() implementation from the bundled musl library.
parent
be147a80
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
76 deletions
+0
-76
math.c
dlls/msvcrt/math.c
+0
-76
No files found.
dlls/msvcrt/math.c
View file @
e5808e20
...
...
@@ -2009,44 +2009,6 @@ float CDECL floorf( float x )
return
u
.
f
;
}
/*********************************************************************
* modff (MSVCRT.@)
*
* Copied from musl: src/math/modff.c
*/
float
CDECL
modff
(
float
x
,
float
*
iptr
)
{
union
{
float
f
;
UINT32
i
;}
u
=
{
x
};
UINT32
mask
;
int
e
=
(
u
.
i
>>
23
&
0xff
)
-
0x7f
;
/* no fractional part */
if
(
e
>=
23
)
{
*
iptr
=
x
;
if
(
e
==
0x80
&&
u
.
i
<<
9
!=
0
)
{
/* nan */
return
x
;
}
u
.
i
&=
0x80000000
;
return
u
.
f
;
}
/* no integral part */
if
(
e
<
0
)
{
u
.
i
&=
0x80000000
;
*
iptr
=
u
.
f
;
return
x
;
}
mask
=
0x007fffff
>>
e
;
if
((
u
.
i
&
mask
)
==
0
)
{
*
iptr
=
x
;
u
.
i
&=
0x80000000
;
return
u
.
f
;
}
u
.
i
&=
~
mask
;
*
iptr
=
u
.
f
;
return
x
-
u
.
f
;
}
#endif
/*********************************************************************
...
...
@@ -5053,44 +5015,6 @@ float CDECL fmaf( float x, float y, float z )
return
u
.
f
;
}
/*********************************************************************
* modf (MSVCRT.@)
*
* Copied from musl: src/math/modf.c
*/
double
CDECL
modf
(
double
x
,
double
*
iptr
)
{
union
{
double
f
;
UINT64
i
;}
u
=
{
x
};
UINT64
mask
;
int
e
=
(
u
.
i
>>
52
&
0x7ff
)
-
0x3ff
;
/* no fractional part */
if
(
e
>=
52
)
{
*
iptr
=
x
;
if
(
e
==
0x400
&&
u
.
i
<<
12
!=
0
)
/* nan */
return
x
;
u
.
i
&=
1ULL
<<
63
;
return
u
.
f
;
}
/* no integral part*/
if
(
e
<
0
)
{
u
.
i
&=
1ULL
<<
63
;
*
iptr
=
u
.
f
;
return
x
;
}
mask
=
-
1ULL
>>
12
>>
e
;
if
((
u
.
i
&
mask
)
==
0
)
{
*
iptr
=
x
;
u
.
i
&=
1ULL
<<
63
;
return
u
.
f
;
}
u
.
i
&=
~
mask
;
*
iptr
=
u
.
f
;
return
x
-
u
.
f
;
}
#if defined(__i386__) || defined(__x86_64__)
static
void
_setfp_sse
(
unsigned
int
*
cw
,
unsigned
int
cw_mask
,
unsigned
int
*
sw
,
unsigned
int
sw_mask
)
...
...
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