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
248a1737
Commit
248a1737
authored
Apr 03, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use the coshf() implementation from the bundled musl library.
With the changes from
36114325
.
parent
bbc8c347
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
39 deletions
+5
-39
math.c
dlls/msvcrt/math.c
+0
-39
coshf.c
libs/musl/src/math/coshf.c
+5
-0
No files found.
dlls/msvcrt/math.c
View file @
248a1737
...
...
@@ -986,45 +986,6 @@ float CDECL cosf( float x )
extern
float
__expo2f
(
float
x
,
float
sign
);
/*********************************************************************
* coshf (MSVCRT.@)
*
* Copied from musl: src/math/coshf.c
*/
float
CDECL
coshf
(
float
x
)
{
UINT32
ui
=
*
(
UINT32
*
)
&
x
;
UINT32
sign
=
ui
&
0x80000000
;
float
t
;
/* |x| */
ui
&=
0x7fffffff
;
x
=
*
(
float
*
)
&
ui
;
/* |x| < log(2) */
if
(
ui
<
0x3f317217
)
{
if
(
ui
<
0x3f800000
-
(
12
<<
23
))
{
fp_barrierf
(
x
+
0x1
p120f
);
return
1
;
}
t
=
expm1f
(
x
);
return
1
+
t
*
t
/
(
2
*
(
1
+
t
));
}
/* |x| < log(FLT_MAX) */
if
(
ui
<
0x42b17217
)
{
t
=
expf
(
x
);
return
0
.
5
f
*
(
t
+
1
/
t
);
}
/* |x| > log(FLT_MAX) or nan */
if
(
ui
>
0x7f800000
)
*
(
UINT32
*
)
&
t
=
ui
|
sign
|
0x400000
;
else
t
=
__expo2f
(
x
,
1
.
0
f
);
return
t
;
}
/*********************************************************************
* expf (MSVCRT.@)
*/
float
CDECL
expf
(
float
x
)
...
...
libs/musl/src/math/coshf.c
View file @
248a1737
...
...
@@ -3,6 +3,7 @@
float
__cdecl
coshf
(
float
x
)
{
union
{
float
f
;
uint32_t
i
;}
u
=
{.
f
=
x
};
uint32_t
sign
=
u
.
i
&
0x80000000
;
uint32_t
w
;
float
t
;
...
...
@@ -28,6 +29,10 @@ float __cdecl coshf(float x)
}
/* |x| > log(FLT_MAX) or nan */
if
(
w
>
0x7f800000
)
{
u
.
i
|=
sign
|
0x400000
;
return
u
.
f
;
}
t
=
__expo2f
(
x
,
1
.
0
f
);
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