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
90c61c7c
Commit
90c61c7c
authored
Mar 30, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use the __cosdf() implementation from the bundled musl library.
With the changes from
9008cd2f
.
parent
b46bf3ff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
25 deletions
+10
-25
math.c
dlls/msvcrt/math.c
+1
-16
__cosdf.c
libs/musl/src/math/__cosdf.c
+9
-9
No files found.
dlls/msvcrt/math.c
View file @
90c61c7c
...
...
@@ -220,22 +220,7 @@ float CDECL _chgsignf( float num )
#ifndef __i386__
extern
float
__sindf
(
double
x
);
/* Copied from musl: src/math/__cosdf.c */
static
float
__cosdf
(
double
x
)
{
static
const
double
C0
=
-
0x1
.
0000000000000
p
-
1
,
C1
=
0x1
.
5555555555555
p
-
5
,
C2
=
-
0x1
.
6
c16c16c16c17p
-
10
,
C3
=
0x1
.
a01a01a01a01ap
-
16
,
C4
=
-
0x1
.27e4
fb7789f5cp
-
22
;
double
z
;
z
=
x
*
x
;
if
(
x
>
-
7.8163146972656250e-03
&&
x
<
7.8163146972656250e-03
)
return
1
+
C0
*
z
;
return
1
.
0
+
z
*
(
C0
+
z
*
(
C1
+
z
*
(
C2
+
z
*
(
C3
+
z
*
C4
))));
}
extern
float
__cosdf
(
double
x
);
static
const
UINT64
exp2f_T
[]
=
{
0x3ff0000000000000ULL
,
0x3fefd9b0d3158574ULL
,
0x3fefb5586cf9890fULL
,
0x3fef9301d0125b51ULL
,
...
...
libs/musl/src/math/__cosdf.c
View file @
90c61c7c
...
...
@@ -18,18 +18,18 @@
/* |cos(x) - c(x)| < 2**-34.1 (~[-5.37e-11, 5.295e-11]). */
static
const
double
C0
=
-
0x1ffffffd0c5e81
.
0
p
-
54
,
/* -0.499999997251031003120 */
C1
=
0x155553e1053a42
.
0
p
-
57
,
/* 0.0416666233237390631894 */
C2
=
-
0x16c087e80f1e27
.
0
p
-
62
,
/* -0.00138867637746099294692 */
C3
=
0x199342e0ee5069
.
0
p
-
68
;
/* 0.0000243904487962774090654 */
C0
=
-
0x1
.
0000000000000
p
-
1
,
C1
=
0x1
.
5555555555555
p
-
5
,
C2
=
-
0x1
.
6
c16c16c16c17p
-
10
,
C3
=
0x1
.
a01a01a01a01ap
-
16
,
C4
=
-
0x1
.27e4
fb7789f5cp
-
22
;
float
__cosdf
(
double
x
)
{
double_t
r
,
w
,
z
;
double_t
z
;
/* Try to optimize for parallel evaluation as in __tandf.c. */
z
=
x
*
x
;
w
=
z
*
z
;
r
=
C2
+
z
*
C3
;
return
((
1
.
0
+
z
*
C0
)
+
w
*
C1
)
+
(
w
*
z
)
*
r
;
if
(
x
>
-
7.8163146972656250e-03
&&
x
<
7.8163146972656250e-03
)
return
1
+
C0
*
z
;
return
1
.
0
+
z
*
(
C0
+
z
*
(
C1
+
z
*
(
C2
+
z
*
(
C3
+
z
*
C4
))))
;
}
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