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
e10bd6f4
Commit
e10bd6f4
authored
Apr 29, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Import y1 implementation from musl.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3911ac3f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
30 deletions
+36
-30
configure
configure
+0
-1
configure.ac
configure.ac
+0
-1
math.c
dlls/msvcrt/math.c
+36
-10
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 @
e10bd6f4
...
...
@@ -19662,7 +19662,6 @@ for ac_func in \
tgammaf
\
trunc
\
truncf
\
y1
\
yn
do
:
...
...
configure.ac
View file @
e10bd6f4
...
...
@@ -2705,7 +2705,6 @@ AC_CHECK_FUNCS(\
tgammaf \
trunc \
truncf \
y1 \
yn
)
LIBS="$ac_save_LIBS"
...
...
dlls/msvcrt/math.c
View file @
e10bd6f4
...
...
@@ -2971,18 +2971,44 @@ double CDECL _y0(double x)
/*********************************************************************
* _y1 (MSVCRT.@)
*/
double
CDECL
_y1
(
double
num
)
double
CDECL
_y1
(
double
x
)
{
double
retval
;
static
const
double
tpi
=
6.36619772367581382433e-01
,
u00
=
-
1.96057090646238940668e-01
,
u01
=
5.04438716639811282616e-02
,
u02
=
-
1.91256895875763547298e-03
,
u03
=
2.35252600561610495928e-05
,
u04
=
-
9.19099158039878874504e-08
,
v00
=
1.99167318236649903973e-02
,
v01
=
2.02552581025135171496e-04
,
v02
=
1.35608801097516229404e-06
,
v03
=
6.22741452364621501295e-09
,
v04
=
1.66559246207992079114e-11
;
if
(
!
isfinite
(
num
))
*
_errno
()
=
EDOM
;
retval
=
unix_funcs
->
y1
(
num
);
if
(
_fpclass
(
retval
)
==
_FPCLASS_NINF
)
{
*
_errno
()
=
EDOM
;
retval
=
NAN
;
}
return
retval
;
double
z
,
u
,
v
;
unsigned
int
ix
,
lx
;
ix
=
*
(
ULONGLONG
*
)
&
x
>>
32
;
lx
=
*
(
ULONGLONG
*
)
&
x
;
/* y1(nan)=nan, y1(<0)=nan, y1(0)=-inf, y1(inf)=0 */
if
((
ix
<<
1
|
lx
)
==
0
)
return
math_error
(
_OVERFLOW
,
"_y1"
,
x
,
0
,
-
INFINITY
);
if
(
isnan
(
x
))
return
x
;
if
(
ix
>>
31
)
return
math_error
(
_DOMAIN
,
"_y1"
,
x
,
0
,
0
/
(
x
-
x
));
if
(
ix
>=
0x7ff00000
)
return
1
/
x
;
if
(
ix
>=
0x40000000
)
/* x >= 2 */
return
j1_y1_approx
(
ix
,
x
,
TRUE
,
0
);
if
(
ix
<
0x3c900000
)
/* x < 2**-54 */
return
-
tpi
/
x
;
z
=
x
*
x
;
u
=
u00
+
z
*
(
u01
+
z
*
(
u02
+
z
*
(
u03
+
z
*
u04
)));
v
=
1
+
z
*
(
v00
+
z
*
(
v01
+
z
*
(
v02
+
z
*
(
v03
+
z
*
v04
))));
return
x
*
(
u
/
v
)
+
tpi
*
(
j1
(
x
)
*
log
(
x
)
-
1
/
x
);
}
/*********************************************************************
...
...
dlls/msvcrt/unixlib.c
View file @
e10bd6f4
...
...
@@ -953,19 +953,6 @@ static float CDECL unix_tgammaf(float x)
}
/*********************************************************************
* y1
*/
static
double
CDECL
unix_y1
(
double
num
)
{
#ifdef HAVE_Y1
return
y1
(
num
);
#else
FIXME
(
"not implemented
\n
"
);
return
0
;
#endif
}
/*********************************************************************
* yn
*/
static
double
CDECL
unix_yn
(
int
order
,
double
num
)
...
...
@@ -1066,7 +1053,6 @@ static const struct unix_funcs funcs =
unix_tgammaf
,
unix_trunc
,
unix_truncf
,
unix_y1
,
unix_yn
};
...
...
dlls/msvcrt/unixlib.h
View file @
e10bd6f4
...
...
@@ -109,7 +109,6 @@ struct unix_funcs
float
(
CDECL
*
tgammaf
)(
float
x
);
double
(
CDECL
*
trunc
)(
double
x
);
float
(
CDECL
*
truncf
)(
float
x
);
double
(
CDECL
*
y1
)(
double
num
);
double
(
CDECL
*
yn
)(
int
order
,
double
num
);
};
...
...
include/config.h.in
View file @
e10bd6f4
...
...
@@ -1169,9 +1169,6 @@
/* Define if Xrandr has the XRRGetProviderResources function */
#undef HAVE_XRRGETPROVIDERRESOURCES
/* Define to 1 if you have the `y1' function. */
#undef HAVE_Y1
/* Define to 1 if you have the `yn' function. */
#undef HAVE_YN
...
...
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