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
938acddb
Commit
938acddb
authored
Mar 31, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use the acos() implementation from the bundled musl library.
parent
5c3de7d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
74 deletions
+2
-74
math.c
dlls/msvcrt/math.c
+0
-73
acos.c
libs/musl/src/math/acos.c
+2
-1
No files found.
dlls/msvcrt/math.c
View file @
938acddb
...
...
@@ -444,79 +444,6 @@ float CDECL tanhf( float x )
#endif
/*********************************************************************
* acos (MSVCRT.@)
*
* Copied from musl: src/math/acos.c
*/
static
double
acos_R
(
double
z
)
{
static
const
double
pS0
=
1.66666666666666657415e-01
,
pS1
=
-
3.25565818622400915405e-01
,
pS2
=
2.01212532134862925881e-01
,
pS3
=
-
4.00555345006794114027e-02
,
pS4
=
7.91534994289814532176e-04
,
pS5
=
3.47933107596021167570e-05
,
qS1
=
-
2.40339491173441421878e+00
,
qS2
=
2.02094576023350569471e+00
,
qS3
=
-
6.88283971605453293030e-01
,
qS4
=
7.70381505559019352791e-02
;
double
p
,
q
;
p
=
z
*
(
pS0
+
z
*
(
pS1
+
z
*
(
pS2
+
z
*
(
pS3
+
z
*
(
pS4
+
z
*
pS5
)))));
q
=
1
.
0
+
z
*
(
qS1
+
z
*
(
qS2
+
z
*
(
qS3
+
z
*
qS4
)));
return
p
/
q
;
}
double
CDECL
acos
(
double
x
)
{
static
const
double
pio2_hi
=
1.57079632679489655800e+00
,
pio2_lo
=
6.12323399573676603587e-17
;
double
z
,
w
,
s
,
c
,
df
;
unsigned
int
hx
,
ix
;
ULONGLONG
llx
;
hx
=
*
(
ULONGLONG
*
)
&
x
>>
32
;
ix
=
hx
&
0x7fffffff
;
/* |x| >= 1 or nan */
if
(
ix
>=
0x3ff00000
)
{
unsigned
int
lx
;
lx
=
*
(
ULONGLONG
*
)
&
x
;
if
(((
ix
-
0x3ff00000
)
|
lx
)
==
0
)
{
/* acos(1)=0, acos(-1)=pi */
if
(
hx
>>
31
)
return
2
*
pio2_hi
+
7.5231638452626401e-37
;
return
0
;
}
if
(
isnan
(
x
))
return
x
;
return
math_error
(
_DOMAIN
,
"acos"
,
x
,
0
,
0
/
(
x
-
x
));
}
/* |x| < 0.5 */
if
(
ix
<
0x3fe00000
)
{
if
(
ix
<=
0x3c600000
)
/* |x| < 2**-57 */
return
pio2_hi
+
7.5231638452626401e-37
;
return
pio2_hi
-
(
x
-
(
pio2_lo
-
x
*
acos_R
(
x
*
x
)));
}
/* x < -0.5 */
if
(
hx
>>
31
)
{
z
=
(
1
.
0
+
x
)
*
0
.
5
;
s
=
sqrt
(
z
);
w
=
acos_R
(
z
)
*
s
-
pio2_lo
;
return
2
*
(
pio2_hi
-
(
s
+
w
));
}
/* x > 0.5 */
z
=
(
1
.
0
-
x
)
*
0
.
5
;
s
=
sqrt
(
z
);
df
=
s
;
llx
=
(
*
(
ULONGLONG
*
)
&
df
>>
32
)
<<
32
;
df
=
*
(
double
*
)
&
llx
;
c
=
(
z
-
df
*
df
)
/
(
s
+
df
);
w
=
acos_R
(
z
)
*
s
+
c
;
return
2
*
(
df
+
w
);
}
/*********************************************************************
* asin (MSVCRT.@)
*
* Copied from musl: src/math/asin.c
...
...
libs/musl/src/math/acos.c
View file @
938acddb
...
...
@@ -75,7 +75,8 @@ double __cdecl acos(double x)
return
2
*
pio2_hi
+
0x1
p
-
120
f
;
return
0
;
}
return
0
/
(
x
-
x
);
if
(
isnan
(
x
))
return
x
;
return
math_error
(
_DOMAIN
,
"acos"
,
x
,
0
,
0
/
(
x
-
x
));
}
/* |x| < 0.5 */
if
(
ix
<
0x3fe00000
)
{
...
...
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