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
09bcc133
Commit
09bcc133
authored
May 17, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
May 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Import cbrtf implementation from musl.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d5eedfc3
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
20 deletions
+29
-20
configure
configure
+0
-1
configure.ac
configure.ac
+0
-1
math.c
dlls/msvcrt/math.c
+29
-1
unixlib.c
dlls/msvcrt/unixlib.c
+0
-13
unixlib.h
dlls/msvcrt/unixlib.h
+0
-1
config.h.in
include/config.h.in
+0
-3
No files found.
configure
View file @
09bcc133
...
...
@@ -19623,7 +19623,6 @@ for ac_func in \
atanh
\
atanhf
\
cbrt
\
cbrtf
\
erf
\
erfc
\
erfcf
\
...
...
configure.ac
View file @
09bcc133
...
...
@@ -2663,7 +2663,6 @@ AC_CHECK_FUNCS(\
atanh \
atanhf \
cbrt \
cbrtf \
erf \
erfc \
erfcf \
...
...
dlls/msvcrt/math.c
View file @
09bcc133
...
...
@@ -4505,10 +4505,38 @@ double CDECL cbrt(double x)
/*********************************************************************
* cbrtf (MSVCR120.@)
*
* Copied from musl: src/math/cbrtf.c
*/
float
CDECL
cbrtf
(
float
x
)
{
return
unix_funcs
->
cbrtf
(
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
;
}
/*********************************************************************
...
...
dlls/msvcrt/unixlib.c
View file @
09bcc133
...
...
@@ -134,18 +134,6 @@ static double CDECL unix_cbrt(double x)
}
/*********************************************************************
* cbrtf
*/
static
float
CDECL
unix_cbrtf
(
float
x
)
{
#ifdef HAVE_CBRTF
return
cbrtf
(
x
);
#else
return
unix_cbrt
(
x
);
#endif
}
/*********************************************************************
* ceil
*/
static
double
CDECL
unix_ceil
(
double
x
)
...
...
@@ -738,7 +726,6 @@ static const struct unix_funcs funcs =
unix_atanh
,
unix_atanhf
,
unix_cbrt
,
unix_cbrtf
,
unix_ceil
,
unix_ceilf
,
unix_cos
,
...
...
dlls/msvcrt/unixlib.h
View file @
09bcc133
...
...
@@ -30,7 +30,6 @@ struct unix_funcs
double
(
CDECL
*
atanh
)(
double
x
);
float
(
CDECL
*
atanhf
)(
float
x
);
double
(
CDECL
*
cbrt
)(
double
x
);
float
(
CDECL
*
cbrtf
)(
float
x
);
double
(
CDECL
*
ceil
)(
double
x
);
float
(
CDECL
*
ceilf
)(
float
x
);
double
(
CDECL
*
cos
)(
double
x
);
...
...
include/config.h.in
View file @
09bcc133
...
...
@@ -70,9 +70,6 @@
/* Define to 1 if you have the `cbrt' function. */
#undef HAVE_CBRT
/* Define to 1 if you have the `cbrtf' function. */
#undef HAVE_CBRTF
/* Define to 1 if you have the `clock_gettime' function. */
#undef HAVE_CLOCK_GETTIME
...
...
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