Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
406c583c
Commit
406c583c
authored
Apr 03, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use the cbrt()/cbrtf() implementation from the bundled musl library.
parent
e5808e20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
84 deletions
+0
-84
math.c
dlls/msvcrt/math.c
+0
-84
No files found.
dlls/msvcrt/math.c
View file @
406c583c
...
...
@@ -7723,90 +7723,6 @@ void __cdecl __libm_sse2_sqrt_precise(void)
#if _MSVCR_VER>=120
/*********************************************************************
* cbrt (MSVCR120.@)
*
* Copied from musl: src/math/cbrt.c
*/
double
CDECL
cbrt
(
double
x
)
{
static
const
UINT32
B1
=
715094163
,
B2
=
696219795
;
static
const
double
P0
=
1
.
87595182427177009643
,
P1
=
-
1
.
88497979543377169875
,
P2
=
1
.
621429720105354466140
,
P3
=
-
0
.
758397934778766047437
,
P4
=
0
.
145996192886612446982
;
union
{
double
f
;
UINT64
i
;}
u
=
{
x
};
double
r
,
s
,
t
,
w
;
UINT32
hx
=
u
.
i
>>
32
&
0x7fffffff
;
if
(
hx
>=
0x7ff00000
)
/* cbrt(NaN,INF) is itself */
return
x
+
x
;
if
(
hx
<
0x00100000
)
{
/* zero or subnormal? */
u
.
f
=
x
*
0x1
p54
;
hx
=
u
.
i
>>
32
&
0x7fffffff
;
if
(
hx
==
0
)
return
x
;
hx
=
hx
/
3
+
B2
;
}
else
hx
=
hx
/
3
+
B1
;
u
.
i
&=
1ULL
<<
63
;
u
.
i
|=
(
UINT64
)
hx
<<
32
;
t
=
u
.
f
;
r
=
(
t
*
t
)
*
(
t
/
x
);
t
=
t
*
((
P0
+
r
*
(
P1
+
r
*
P2
))
+
((
r
*
r
)
*
r
)
*
(
P3
+
r
*
P4
));
u
.
f
=
t
;
u
.
i
=
(
u
.
i
+
0x80000000
)
&
0xffffffffc0000000ULL
;
t
=
u
.
f
;
s
=
t
*
t
;
r
=
x
/
s
;
w
=
t
+
t
;
r
=
(
r
-
t
)
/
(
w
+
r
);
t
=
t
+
t
*
r
;
return
t
;
}
/*********************************************************************
* cbrtf (MSVCR120.@)
*
* Copied from musl: src/math/cbrtf.c
*/
float
CDECL
cbrtf
(
float
x
)
{
static
const
unsigned
B1
=
709958130
,
B2
=
642849266
;
double
r
,
T
;
union
{
float
f
;
UINT32
i
;}
u
=
{
x
};
UINT32
hx
=
u
.
i
&
0x7fffffff
;
if
(
hx
>=
0x7f800000
)
return
x
+
x
;
if
(
hx
<
0x00800000
)
{
/* zero or subnormal? */
if
(
hx
==
0
)
return
x
;
u
.
f
=
x
*
0x1
p24f
;
hx
=
u
.
i
&
0x7fffffff
;
hx
=
hx
/
3
+
B2
;
}
else
hx
=
hx
/
3
+
B1
;
u
.
i
&=
0x80000000
;
u
.
i
|=
hx
;
T
=
u
.
f
;
r
=
T
*
T
*
T
;
T
=
T
*
(
x
+
x
+
r
)
/
(
x
+
r
+
r
);
r
=
T
*
T
*
T
;
T
=
T
*
(
x
+
x
+
r
)
/
(
x
+
r
+
r
);
return
T
;
}
/*********************************************************************
* exp2 (MSVCR120.@)
*
* Copied from musl: src/math/exp2.c
...
...
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