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
ed49a95d
Commit
ed49a95d
authored
May 25, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
May 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Import atanf implementation from musl.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
da55a453
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
25 deletions
+22
-25
configure
configure
+0
-1
configure.ac
configure.ac
+0
-1
math.c
dlls/msvcrt/math.c
+22
-6
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 @
ed49a95d
...
...
@@ -19617,7 +19617,6 @@ fi
for
ac_func
in
\
atanh
\
atanhf
\
exp2
\
exp2f
\
expm1
\
...
...
configure.ac
View file @
ed49a95d
...
...
@@ -2657,7 +2657,6 @@ fi
AC_CHECK_FUNCS(\
atanh \
atanhf \
exp2 \
exp2f \
expm1 \
...
...
dlls/msvcrt/math.c
View file @
ed49a95d
...
...
@@ -6687,21 +6687,37 @@ double CDECL atanh(double x)
/*********************************************************************
* atanhf (MSVCR120.@)
*
* Copied from musl: src/math/atanhf.c
*/
float
CDECL
atanhf
(
float
x
)
{
float
ret
;
UINT32
ux
=
*
(
UINT32
*
)
&
x
;
int
s
=
ux
>>
31
;
if
(
x
>
1
||
x
<
-
1
)
{
/* |x| */
ux
&=
0x7fffffff
;
x
=
*
(
float
*
)
&
ux
;
if
(
x
>
1
)
{
*
_errno
()
=
EDOM
;
feraiseexcept
(
FE_INVALID
);
return
NAN
;
}
ret
=
unix_funcs
->
atanh
(
x
);
if
(
!
isfinite
(
ret
))
*
_errno
()
=
ERANGE
;
return
ret
;
if
(
ux
<
0x3f800000
-
(
1
<<
23
))
{
if
(
ux
<
0x3f800000
-
(
32
<<
23
))
{
fp_barrierf
(
x
+
0x1
p120f
);
if
(
ux
<
(
1
<<
23
))
/* handle underflow */
fp_barrierf
(
x
*
x
);
}
else
{
/* |x| < 0.5, up to 1.7ulp error */
x
=
0
.
5
f
*
log1pf
(
2
*
x
+
2
*
x
*
x
/
(
1
-
x
));
}
}
else
{
/* avoid overflow */
x
=
0
.
5
f
*
log1pf
(
2
*
(
x
/
(
1
-
x
)));
if
(
isinf
(
x
))
*
_errno
()
=
ERANGE
;
}
return
s
?
-
x
:
x
;
}
#endif
/* _MSVCR_VER>=120 */
...
...
dlls/msvcrt/unixlib.c
View file @
ed49a95d
...
...
@@ -56,18 +56,6 @@ static double CDECL unix_atanh(double x)
}
/*********************************************************************
* atanhf
*/
static
float
CDECL
unix_atanhf
(
float
x
)
{
#ifdef HAVE_ATANHF
return
atanhf
(
x
);
#else
return
unix_atanh
(
x
);
#endif
}
/*********************************************************************
* cosh
*/
static
double
CDECL
unix_cosh
(
double
x
)
...
...
@@ -394,7 +382,6 @@ static float CDECL unix_tgammaf(float x)
static
const
struct
unix_funcs
funcs
=
{
unix_atanh
,
unix_atanhf
,
unix_cosh
,
unix_coshf
,
unix_exp
,
...
...
dlls/msvcrt/unixlib.h
View file @
ed49a95d
...
...
@@ -24,7 +24,6 @@
struct
unix_funcs
{
double
(
CDECL
*
atanh
)(
double
x
);
float
(
CDECL
*
atanhf
)(
float
x
);
double
(
CDECL
*
cosh
)(
double
x
);
float
(
CDECL
*
coshf
)(
float
x
);
double
(
CDECL
*
exp
)(
double
x
);
...
...
include/config.h.in
View file @
ed49a95d
...
...
@@ -34,9 +34,6 @@
/* Define to 1 if you have the `atanh' function. */
#undef HAVE_ATANH
/* Define to 1 if you have the `atanhf' function. */
#undef HAVE_ATANHF
/* Define to 1 if you have the <AudioToolbox/AudioConverter.h> header file. */
#undef HAVE_AUDIOTOOLBOX_AUDIOCONVERTER_H
...
...
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