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
bc9105e2
Commit
bc9105e2
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 acosh implementation from musl.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
75537f43
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
21 deletions
+11
-21
configure
configure
+0
-1
configure.ac
configure.ac
+0
-1
math.c
dlls/msvcrt/math.c
+11
-1
unixlib.c
dlls/msvcrt/unixlib.c
+0
-14
unixlib.h
dlls/msvcrt/unixlib.h
+0
-1
config.h.in
include/config.h.in
+0
-3
No files found.
configure
View file @
bc9105e2
...
...
@@ -19616,7 +19616,6 @@ $as_echo "#define HAVE_ISNAN 1" >>confdefs.h
fi
for
ac_func
in
\
acosh
\
asinh
\
asinhf
\
atanh
\
...
...
configure.ac
View file @
bc9105e2
...
...
@@ -2656,7 +2656,6 @@ then
fi
AC_CHECK_FUNCS(\
acosh \
asinh \
asinhf \
atanh \
...
...
dlls/msvcrt/math.c
View file @
bc9105e2
...
...
@@ -6585,16 +6585,26 @@ float CDECL asinhf(float x)
/*********************************************************************
* acosh (MSVCR120.@)
*
* Copied from musl: src/math/acosh.c
*/
double
CDECL
acosh
(
double
x
)
{
int
e
=
*
(
UINT64
*
)
&
x
>>
52
&
0x7ff
;
if
(
x
<
1
)
{
*
_errno
()
=
EDOM
;
feraiseexcept
(
FE_INVALID
);
return
NAN
;
}
return
unix_funcs
->
acosh
(
x
);
if
(
e
<
0x3ff
+
1
)
/* |x| < 2, up to 2ulp error in [1,1.125] */
return
log1p
(
x
-
1
+
sqrt
((
x
-
1
)
*
(
x
-
1
)
+
2
*
(
x
-
1
)));
if
(
e
<
0x3ff
+
26
)
/* |x| < 0x1p26 */
return
log
(
2
*
x
-
1
/
(
x
+
sqrt
(
x
*
x
-
1
)));
/* |x| >= 0x1p26 or nan */
return
log
(
x
)
+
0
.
693147180559945309417232121458176568
;
}
/*********************************************************************
...
...
dlls/msvcrt/unixlib.c
View file @
bc9105e2
...
...
@@ -43,19 +43,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
msvcrt
);
/*********************************************************************
* acosh
*/
static
double
CDECL
unix_acosh
(
double
x
)
{
#ifdef HAVE_ACOSH
return
acosh
(
x
);
#else
if
(
!
isfinite
(
x
*
x
))
return
log
(
2
)
+
log
(
x
);
return
log
(
x
+
sqrt
(
x
*
x
-
1
));
#endif
}
/*********************************************************************
* asinh
*/
static
double
CDECL
unix_asinh
(
double
x
)
...
...
@@ -435,7 +422,6 @@ static float CDECL unix_tgammaf(float x)
static
const
struct
unix_funcs
funcs
=
{
unix_acosh
,
unix_asinh
,
unix_asinhf
,
unix_atanh
,
...
...
dlls/msvcrt/unixlib.h
View file @
bc9105e2
...
...
@@ -23,7 +23,6 @@
struct
unix_funcs
{
double
(
CDECL
*
acosh
)(
double
x
);
double
(
CDECL
*
asinh
)(
double
x
);
float
(
CDECL
*
asinhf
)(
float
x
);
double
(
CDECL
*
atanh
)(
double
x
);
...
...
include/config.h.in
View file @
bc9105e2
...
...
@@ -9,9 +9,6 @@
/* Define to the file extension for executables. */
#undef EXEEXT
/* Define to 1 if you have the `acosh' function. */
#undef HAVE_ACOSH
/* Define to 1 if you have the <alias.h> header file. */
#undef HAVE_ALIAS_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