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
739d4f0c
Commit
739d4f0c
authored
May 29, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
May 31, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Import sinh implementation from musl.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c395ec77
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
13 deletions
+27
-13
math.c
dlls/msvcrt/math.c
+27
-3
unixlib.c
dlls/msvcrt/unixlib.c
+0
-9
unixlib.h
dlls/msvcrt/unixlib.h
+0
-1
No files found.
dlls/msvcrt/math.c
View file @
739d4f0c
...
...
@@ -2527,9 +2527,33 @@ double CDECL sin( double x )
*/
double
CDECL
sinh
(
double
x
)
{
double
ret
=
unix_funcs
->
sinh
(
x
);
if
(
isnan
(
x
))
return
math_error
(
_DOMAIN
,
"sinh"
,
x
,
0
,
ret
);
return
ret
;
UINT64
ux
=
*
(
UINT64
*
)
&
x
;
UINT32
w
;
double
t
,
h
,
absx
;
h
=
0
.
5
;
if
(
ux
>>
63
)
h
=
-
h
;
/* |x| */
ux
&=
(
UINT64
)
-
1
/
2
;
absx
=
*
(
double
*
)
&
ux
;
w
=
ux
>>
32
;
/* |x| < log(DBL_MAX) */
if
(
w
<
0x40862e42
)
{
t
=
__expm1
(
absx
);
if
(
w
<
0x3ff00000
)
{
if
(
w
<
0x3ff00000
-
(
26
<<
20
))
return
x
;
return
h
*
(
2
*
t
-
t
*
t
/
(
t
+
1
));
}
return
h
*
(
t
+
t
/
(
t
+
1
));
}
/* |x| > log(DBL_MAX) or nan */
/* note: the result is stored to handle overflow */
t
=
__expo2
(
absx
,
2
*
h
);
return
t
;
}
static
BOOL
sqrt_validate
(
double
*
x
,
BOOL
update_sw
)
...
...
dlls/msvcrt/unixlib.c
View file @
739d4f0c
...
...
@@ -269,14 +269,6 @@ static float CDECL unix_powf( float x, float y )
}
/*********************************************************************
* sinh
*/
static
double
CDECL
unix_sinh
(
double
x
)
{
return
sinh
(
x
);
}
/*********************************************************************
* sinhf
*/
static
float
CDECL
unix_sinhf
(
float
x
)
...
...
@@ -351,7 +343,6 @@ static const struct unix_funcs funcs =
unix_log2f
,
unix_pow
,
unix_powf
,
unix_sinh
,
unix_sinhf
,
unix_tanh
,
unix_tanhf
,
...
...
dlls/msvcrt/unixlib.h
View file @
739d4f0c
...
...
@@ -46,7 +46,6 @@ struct unix_funcs
float
(
CDECL
*
log2f
)(
float
x
);
double
(
CDECL
*
pow
)(
double
x
,
double
y
);
float
(
CDECL
*
powf
)(
float
x
,
float
y
);
double
(
CDECL
*
sinh
)(
double
x
);
float
(
CDECL
*
sinhf
)(
float
x
);
double
(
CDECL
*
tanh
)(
double
x
);
float
(
CDECL
*
tanhf
)(
float
x
);
...
...
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