mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
* sysdeps/i386/fpu/libm-test-ulps (float): Add ulps for new tests.
* math/libm-test.inc (j0_test): Add extra tests. * sysdeps/ieee754/ldbl-128/e_j0l.c (__ieee754_j0l): Use |x|, not x, in Hankel approximation. Patches by Stephen L Moshier.
This commit is contained in:
@ -2865,6 +2865,8 @@ j0_test (void)
|
|||||||
TEST_f_f (j0, 2.0, 0.22389077914123566805L);
|
TEST_f_f (j0, 2.0, 0.22389077914123566805L);
|
||||||
TEST_f_f (j0, 8.0, 0.17165080713755390609L);
|
TEST_f_f (j0, 8.0, 0.17165080713755390609L);
|
||||||
TEST_f_f (j0, 10.0, -0.24593576445134833520L);
|
TEST_f_f (j0, 10.0, -0.24593576445134833520L);
|
||||||
|
TEST_f_f (j0, 4.0, -3.9714980986384737228659076845169804197562E-1L);
|
||||||
|
TEST_f_f (j0, -4.0, -3.9714980986384737228659076845169804197562E-1L);
|
||||||
|
|
||||||
END (j0);
|
END (j0);
|
||||||
}
|
}
|
||||||
|
@ -681,6 +681,21 @@ ifloat: 1
|
|||||||
Test "j0 (10.0) == -0.24593576445134833520":
|
Test "j0 (10.0) == -0.24593576445134833520":
|
||||||
double: 2
|
double: 2
|
||||||
idouble: 2
|
idouble: 2
|
||||||
|
Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1":
|
||||||
|
double: 1
|
||||||
|
float: 1
|
||||||
|
idouble: 1
|
||||||
|
ifloat: 1
|
||||||
|
ildouble: 1
|
||||||
|
ldouble: 1
|
||||||
|
Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1":
|
||||||
|
double: 1
|
||||||
|
float: 1
|
||||||
|
idouble: 1
|
||||||
|
ifloat: 1
|
||||||
|
ildouble: 1
|
||||||
|
ldouble: 1
|
||||||
|
|
||||||
|
|
||||||
# j1
|
# j1
|
||||||
Test "j1 (10.0) == 0.043472746168861436670":
|
Test "j1 (10.0) == 0.043472746168861436670":
|
||||||
@ -1500,6 +1515,8 @@ float: 1
|
|||||||
ifloat: 1
|
ifloat: 1
|
||||||
double: 2
|
double: 2
|
||||||
idouble: 2
|
idouble: 2
|
||||||
|
ldouble: 1
|
||||||
|
ildouble: 1
|
||||||
|
|
||||||
Function: "j1":
|
Function: "j1":
|
||||||
double: 2
|
double: 2
|
||||||
|
@ -754,16 +754,16 @@ __ieee754_j0l (long double x)
|
|||||||
= 1/sqrt(2) * (sin(x) - cos(x))
|
= 1/sqrt(2) * (sin(x) - cos(x))
|
||||||
sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
|
sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
|
||||||
cf. Fdlibm. */
|
cf. Fdlibm. */
|
||||||
c = cosl (x);
|
c = cosl (xx);
|
||||||
s = sinl (x);
|
s = sinl (xx);
|
||||||
ss = s - c;
|
ss = s - c;
|
||||||
cc = s + c;
|
cc = s + c;
|
||||||
z = -cosl (x + x);
|
z = -cosl (xx + xx);
|
||||||
if ((s * c) < 0)
|
if ((s * c) < 0)
|
||||||
cc = z / ss;
|
cc = z / ss;
|
||||||
else
|
else
|
||||||
ss = z / cc;
|
ss = z / cc;
|
||||||
z = ONEOSQPI * (p * cc - q * ss) / sqrtl (x);
|
z = ONEOSQPI * (p * cc - q * ss) / sqrtl (xx);
|
||||||
return z;
|
return z;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user