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
03bdd6d5
Commit
03bdd6d5
authored
Apr 03, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use the sinh() implementation from the bundled musl library.
With the changes from
11166aa0
.
parent
9fd9ebcb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
40 deletions
+5
-40
math.c
dlls/msvcrt/math.c
+0
-40
sinh.c
libs/musl/src/math/sinh.c
+5
-0
No files found.
dlls/msvcrt/math.c
View file @
03bdd6d5
...
...
@@ -2153,8 +2153,6 @@ double CDECL cos( double x )
}
}
extern
double
__expo2
(
double
x
,
double
sign
);
/* Copied from musl: src/math/exp_data.c */
static
const
UINT64
exp_T
[]
=
{
0x0ULL
,
0x3ff0000000000000ULL
,
...
...
@@ -2860,44 +2858,6 @@ double CDECL sin( double x )
}
}
/*********************************************************************
* sinh (MSVCRT.@)
*/
double
CDECL
sinh
(
double
x
)
{
UINT64
ux
=
*
(
UINT64
*
)
&
x
;
UINT64
sign
=
ux
&
0x8000000000000000ULL
;
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 */
if
(
ux
>
0x7ff0000000000000ULL
)
*
(
UINT64
*
)
&
t
=
ux
|
sign
|
0x0008000000000000ULL
;
else
t
=
__expo2
(
absx
,
2
*
h
);
return
t
;
}
static
BOOL
sqrt_validate
(
double
*
x
,
BOOL
update_sw
)
{
short
c
=
_dclass
(
*
x
);
...
...
libs/musl/src/math/sinh.c
View file @
03bdd6d5
...
...
@@ -7,6 +7,7 @@
double
__cdecl
sinh
(
double
x
)
{
union
{
double
f
;
uint64_t
i
;}
u
=
{.
f
=
x
};
uint64_t
sign
=
u
.
i
&
0x8000000000000000ULL
;
uint32_t
w
;
double
t
,
h
,
absx
;
...
...
@@ -34,6 +35,10 @@ double __cdecl sinh(double x)
/* |x| > log(DBL_MAX) or nan */
/* note: the result is stored to handle overflow */
if
(
w
>
0x7ff00000
)
{
u
.
i
|=
sign
|
0x0008000000000000ULL
;
return
u
.
f
;
}
t
=
__expo2
(
absx
,
2
*
h
);
return
t
;
}
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