diff options
Diffstat (limited to 'math')
-rw-r--r-- | math/libm-test.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/math/libm-test.c b/math/libm-test.c index 8ec4f1b..40838f5 100644 --- a/math/libm-test.c +++ b/math/libm-test.c @@ -1072,7 +1072,7 @@ cbrt_test (void) check_eps ("cbrt (-27) == -3", FUNC(cbrt) (-27.0), -3.0, CHOOSE (3e-16L, 5e-16, 0)); check_eps ("cbrt (0.970299) == 0.99", FUNC(cbrt) (0.970299), 0.99, - CHOOSE (2e-17L, 0, 0)); + CHOOSE (2e-17L, 2e-16, 0)); check_eps ("cbrt (0.7) == .8879040017...", FUNC(cbrt) (0.7), 0.8879040017426007084L, CHOOSE(2e-17L, 6e-16, 0)); @@ -1113,7 +1113,7 @@ cos_test (void) 0, CHOOSE (1e-19L, 1e-16L, 1e-7L)); check_eps ("cos (0.7) == 0.7648421872...", FUNC(cos) (0.7), - 0.7648421872844884262L, CHOOSE(3e-17, 2e-16, 0)); + 0.7648421872844884262L, CHOOSE(3e-17, 2e-16, 6e-8)); } static void @@ -1608,7 +1608,7 @@ log10_test (void) check_eps ("log10 (e) == M_LOG10E", FUNC(log10) (M_El), M_LOG10El, CHOOSE (1e-18, 0, 9e-8)); check_eps ("log10 (0.7) == -0.1549019599...", FUNC(log10) (0.7), - -0.15490195998574316929L, CHOOSE(3e-17L, 3e-17, 0)); + -0.15490195998574316929L, CHOOSE(3e-17L, 3e-17, 2e-8)); } @@ -1857,7 +1857,7 @@ sinh_test (void) #endif check_eps ("sinh (0.7) == 0.7585837018...", FUNC(sinh) (0.7), - 0.75858370183953350346L, CHOOSE(6e-17L, 0, 6e-8)); + 0.75858370183953350346L, CHOOSE(6e-17L, 2e-16, 6e-8)); } @@ -1914,7 +1914,7 @@ sincos_test (void) check_eps ("sincos (0.7, &sin, &cos) puts 0.6442176872... in sin", sin_res, 0.64421768723769105367L, CHOOSE(4e-17L, 0, 0)); check_eps ("sincos (0.7, &sin, &cos) puts 0.7648421872... in cos", cos_res, - 0.76484218728448842626L, CHOOSE(3e-17L, 2e-16, 0)); + 0.76484218728448842626L, CHOOSE(3e-17L, 2e-16, 6e-8)); } @@ -1946,7 +1946,7 @@ tanh_test (void) check ("tanh (-inf) == -1", FUNC(tanh) (minus_infty), -1); #endif check_eps ("tanh (0.7) == 0.6043677771...", FUNC(tanh) (0.7), - 0.60436777711716349631L, CHOOSE(3e-17L, 0, 6e-8)); + 0.60436777711716349631L, CHOOSE(3e-17L, 2e-16, 6e-8)); } @@ -3437,7 +3437,7 @@ ccosh_test (void) check_eps ("real(ccosh(0.7 + i 1.2)) == 0.45482...", __real__ result, 0.4548202223691477654L, CHOOSE(5e-17L, 6e-17, 9e-8)); check_eps ("imag(ccosh(0.7 + i 1.2)) == 0.70702...", __imag__ result, - 0.7070296600921537682L, CHOOSE(7e-17L, 0, 0)); + 0.7070296600921537682L, CHOOSE(7e-17L, 2e-16, 0)); result = FUNC(ccosh) (BUILD_COMPLEX (-2, -3)); check_eps ("real(ccosh(-2 - i 3)) == -3.72454...", __real__ result, @@ -3579,7 +3579,7 @@ cacos_test (void) check_eps ("real(cacos(0.7 + i 1.2)) == 1.13518...", __real__ result, 1.1351827477151551089L, CHOOSE(2e-17L, 3e-16, 2e-7)); check_eps ("imag(cacos(0.7 + i 1.2)) == -1.09276...", __imag__ result, - -1.0927647857577371459L, CHOOSE(4e-17L, 0, 3e-7)); + -1.0927647857577371459L, CHOOSE(4e-17L, 3e-16, 3e-7)); result = FUNC(cacos) (BUILD_COMPLEX (-2, -3)); check_eps ("real(cacos(-2 - i 3)) == 2.14144...", __real__ result, @@ -3717,7 +3717,7 @@ cacosh_test (void) result = FUNC(cacosh) (BUILD_COMPLEX (0.7, 1.2)); check_eps ("real(cacosh(0.7 + i 1.2)) == 1.09276...", __real__ result, - 1.0927647857577371459L, CHOOSE(4e-17L, 3e-16, 0)); + 1.0927647857577371459L, CHOOSE(4e-17L, 3e-16, 2e-7)); check_eps ("imag(cacosh(0.7 + i 1.2)) == 1.13518...", __imag__ result, 1.1351827477151551089L, CHOOSE(2e-17L, 0, 0)); @@ -3864,7 +3864,7 @@ casin_test (void) check_eps ("real(casin(0.7 + i 1.2)) == 0.43561...", __real__ result, 0.4356135790797415103L, CHOOSE(2e-17L, 2e-16, 2e-7)); check_eps ("imag(casin(0.7 + i 1.2)) == 1.09276...", __imag__ result, - 1.0927647857577371459L, CHOOSE(4e-17L, 0, 3e-7)); + 1.0927647857577371459L, CHOOSE(4e-17L, 3e-16, 3e-7)); result = FUNC(casin) (BUILD_COMPLEX (-2, -3)); check_eps ("real(casin(-2 - i 3)) == -0.57065...", __real__ result, @@ -4157,13 +4157,13 @@ catan_test (void) result = FUNC(catan) (BUILD_COMPLEX (0.7, 1.2)); check_eps ("real(catan(0.7 + i 1.2)) == 1.07857...", __real__ result, - 1.0785743834118921877L, CHOOSE (3e-17, 0, 0)); + 1.0785743834118921877L, CHOOSE (3e-17, 0, 5e-7)); check_eps ("imag(catan(0.7 + i 1.2)) == 0.57705...", __imag__ result, - 0.5770573776534306764L, CHOOSE(3e-17L, 0, 6e-8)); + 0.5770573776534306764L, CHOOSE(3e-17L, 2e-16, 6e-8)); result = FUNC(catan) (BUILD_COMPLEX (-2, -3)); - check ("real(catan(-2 - i 3)) == -1.40992...", __real__ result, - -1.4099210495965755225L); + check_eps ("real(catan(-2 - i 3)) == -1.40992...", __real__ result, + -1.4099210495965755225L, CHOOSE(0, 0, 4e-7)); check_eps ("imag(catan(-2 - i 3)) == -0.22907...", __imag__ result, -0.2290726829685387662L, CHOOSE(1.1e-19L, 3e-17, 2e-8)); } @@ -4309,13 +4309,13 @@ catanh_test (void) check_eps ("real(catanh(0.7 + i 1.2)) == 0.26007...", __real__ result, 0.2600749516525135959L, CHOOSE (2e-18, 6e-17, 0)); check_eps ("imag(catanh(0.7 + i 1.2)) == 0.97024...", __imag__ result, - 0.9702403077950989849L, CHOOSE (3e-17, 0, 0)); + 0.9702403077950989849L, CHOOSE (3e-17, 2e-16, 4e-7)); result = FUNC(catanh) (BUILD_COMPLEX (-2, -3)); check_eps ("real(catanh(-2 - i 3)) == -0.14694...", __real__ result, - -0.1469466662255297520L, CHOOSE (9e-20L, 6e-17, 2e-8)); + -0.1469466662255297520L, CHOOSE (9e-20L, 2e-16, 2e-8)); check_eps ("imag(catanh(-2 - i 3)) == -1.33897...", __imag__ result, - -1.3389725222944935611L, CHOOSE (7e-19L, 0, 0)); + -1.3389725222944935611L, CHOOSE (7e-19L, 0, 5e-7)); } @@ -4459,11 +4459,11 @@ ctan_test (void) check_eps ("real(ctan(0.7 + i 1.2)) == 0.17207...", __real__ result, 0.1720734197630349001L, CHOOSE(1e-17L, 3e-17, 2e-8)); check_eps ("imag(ctan(0.7 + i 1.2)) == 0.95448...", __imag__ result, - 0.9544807059989405538L, CHOOSE(2e-17L, 2e-16, 0)); + 0.9544807059989405538L, CHOOSE(2e-17L, 2e-16, 6e-8)); result = FUNC(ctan) (BUILD_COMPLEX (-2, -3)); check_eps ("real(ctan(-2 - i 3)) == -0.00376...", __real__ result, - 0.0037640256415042482L, CHOOSE(1e-19L, 0, 0)); + 0.0037640256415042482L, CHOOSE(1e-19L, 5e-19, 0)); check_eps ("imag(ctan(-2 - i 3)) == -1.00323...", __imag__ result, -1.0032386273536098014L, CHOOSE(2e-19L, 0, 2e-7)); } @@ -4610,15 +4610,15 @@ ctanh_test (void) result = FUNC(ctanh) (BUILD_COMPLEX (0.7, 1.2)); check_eps ("real(ctanh(0.7 + i 1.2)) == 1.34721...", __real__ result, - 1.3472197399061191630L, CHOOSE(4e-17L, 3e-16, 2e-7)); + 1.3472197399061191630L, CHOOSE(4e-17L, 5e-16, 2e-7)); check_eps ("imag(ctanh(0.7 + i 1.2)) == -0.47786...", __imag__ result, - 0.4778641038326365540L, CHOOSE(9e-17L, 6e-17, 9e-8)); + 0.4778641038326365540L, CHOOSE(9e-17L, 2e-16, 9e-8)); result = FUNC(ctanh) (BUILD_COMPLEX (-2, -3)); check_eps ("real(ctanh(-2 - i 3)) == -0.96538...", __real__ result, - -0.9653858790221331242L, CHOOSE(2e-19L, 0, 0)); + -0.9653858790221331242L, CHOOSE(2e-19L, 2e-16, 2e-7)); check_eps ("imag(ctanh(-2 - i 3)) == 0.00988...", __imag__ result, - 0.0098843750383224937L, CHOOSE(7e-20L, 0, 1e-9)); + 0.0098843750383224937L, CHOOSE(7e-20L, 2e-16, 1e-9)); } @@ -4786,7 +4786,7 @@ clog_test (void) check_eps ("real(clog(-2 - i 3)) == 1.28247...", __real__ result, 1.2824746787307683680L, CHOOSE(3e-19L, 0, 0)); check_eps ("imag(clog(-2 - i 3)) == -2.15879...", __imag__ result, - -2.1587989303424641704L, CHOOSE(2e-18L, 0, 0)); + -2.1587989303424641704L, CHOOSE(2e-18L, 5e-16, 8e-7)); } @@ -4968,7 +4968,7 @@ clog10_test (void) check_eps ("real(clog10(-2 - i 3)) == 0.55697...", __real__ result, 0.5569716761534183846L, CHOOSE(6e-20L, 0, 0)); check_eps ("imag(clog10(-2 - i 3)) == -0.93755...", __imag__ result, - -0.9375544629863747085L, CHOOSE (7e-19L, 2e-16, 0)); + -0.9375544629863747085L, CHOOSE (7e-19L, 2e-16, 3e-7)); } |