diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-12-18 17:59:29 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2013-12-18 17:59:29 +0000 |
commit | f889953b44da50bf8a7824c97d09dbe03fd11b83 (patch) | |
tree | d498fd7f8015c4de4f9fe5bfaf3b6bd476271dd7 /math/libm-test.inc | |
parent | Update powerpc-nofpu localplt.data for fegetround hidden_proto / hidden_def. (diff) | |
download | glibc-f889953b44da50bf8a7824c97d09dbe03fd11b83.tar.gz glibc-f889953b44da50bf8a7824c97d09dbe03fd11b83.tar.bz2 glibc-f889953b44da50bf8a7824c97d09dbe03fd11b83.zip |
Move tests of jn and yn from libm-test.inc to auto-libm-test-in.
This patch moves tests of jn and yn to auto-libm-test-in, adding the
required support for gen-auto-libm-tests (and adding a missing
assertion there and fixing logic that was broken for functions with
integer arguments).
Tested x86_64 and x86 and ulps updated accordingly.
* math/auto-libm-test-in: Add tests of jn and yn.
* math/auto-libm-test-out: Regenerated.
* math/libm-test.inc (jn_test_data): Use AUTO_TESTS_if_f.
(yn_test_data): Likewise.
* math/gen-auto-libm-tests.c (func_calc_method): Add value
mpfr_if_f.
(func_calc_desc): Add mpfr_if_f union field.
(FUNC_mpfr_if_f): New macro.
(test_functions): Add jn and yn.
(calc_generic_results): Assert type of second input for
mpfr_ff_f. Handle mpfr_if_f.
(output_for_one_input_case): Disable all checking for arguments
fitting floating-point types in case of an integer argument.
* sysdeps/i386/fpu/libm-test-ulps: Update.
* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
Diffstat (limited to 'math/libm-test.inc')
-rw-r--r-- | math/libm-test.inc | 99 |
1 files changed, 2 insertions, 97 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc index 5988b25d72..dea6c8b7ce 100644 --- a/math/libm-test.inc +++ b/math/libm-test.inc @@ -9495,73 +9495,20 @@ static const struct test_if_f_data jn_test_data[] = /* jn (0, x) == j0 (x) */ TEST_if_f (jn, 0, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), TEST_if_f (jn, 0, plus_infty, 0), - TEST_if_f (jn, 0, -1.0, 0.765197686557966551449717526102663221L), - TEST_if_f (jn, 0, 0.0, 1.0), - TEST_if_f (jn, 0, 0.125L, 0.996097563041985204620768999453174712L), - TEST_if_f (jn, 0, 0.75L, 0.864242275166648623555731103820923211L), - TEST_if_f (jn, 0, 1.0, 0.765197686557966551449717526102663221L), - TEST_if_f (jn, 0, 1.5, 0.511827671735918128749051744283411720L), - TEST_if_f (jn, 0, 2.0, 0.223890779141235668051827454649948626L), - TEST_if_f (jn, 0, 8.0, 0.171650807137553906090869407851972001L), - TEST_if_f (jn, 0, 10.0, -0.245935764451348335197760862485328754L), - TEST_if_f (jn, 0, 4.0, -3.9714980986384737228659076845169804197562E-1L), - TEST_if_f (jn, 0, -4.0, -3.9714980986384737228659076845169804197562E-1L), /* jn (1, x) == j1 (x) */ TEST_if_f (jn, 1, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), TEST_if_f (jn, 1, plus_infty, 0), - TEST_if_f (jn, 1, -1.0, -0.440050585744933515959682203718914913L), - TEST_if_f (jn, 1, 0.0, 0.0), - TEST_if_f (jn, 1, 0.125L, 0.0623780091344946810942311355879361177L), - TEST_if_f (jn, 1, 0.75L, 0.349243602174862192523281016426251335L), - TEST_if_f (jn, 1, 1.0, 0.440050585744933515959682203718914913L), - TEST_if_f (jn, 1, 1.5, 0.557936507910099641990121213156089400L), - TEST_if_f (jn, 1, 2.0, 0.576724807756873387202448242269137087L), - TEST_if_f (jn, 1, 8.0, 0.234636346853914624381276651590454612L), - TEST_if_f (jn, 1, 10.0, 0.0434727461688614366697487680258592883L), /* jn (3, x) */ TEST_if_f (jn, 3, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), TEST_if_f (jn, 3, plus_infty, 0), - TEST_if_f (jn, 3, -1.0, -0.0195633539826684059189053216217515083L), - TEST_if_f (jn, 3, 0.0, 0.0), - TEST_if_f (jn, 3, 0.125L, 0.406503832554912875023029337653442868e-4L), - TEST_if_f (jn, 3, 0.75L, 0.848438342327410884392755236884386804e-2L), - TEST_if_f (jn, 3, 1.0, 0.0195633539826684059189053216217515083L), - TEST_if_f (jn, 3, 2.0, 0.128943249474402051098793332969239835L), - TEST_if_f (jn, 3, 10.0, 0.0583793793051868123429354784103409563L), - /* jn (10, x) */ TEST_if_f (jn, 10, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), TEST_if_f (jn, 10, plus_infty, 0), - TEST_if_f (jn, 10, -1.0, 0.263061512368745320699785368779050294e-9L), - TEST_if_f (jn, 10, 0.0, 0.0), - TEST_if_f (jn, 10, 0.125L, 0.250543369809369890173993791865771547e-18L), - TEST_if_f (jn, 10, 0.75L, 0.149621713117596814698712483621682835e-10L), - TEST_if_f (jn, 10, 1.0, 0.263061512368745320699785368779050294e-9L), - TEST_if_f (jn, 10, 2.0, 0.251538628271673670963516093751820639e-6L), - TEST_if_f (jn, 10, 10.0, 0.207486106633358857697278723518753428L), - - /* BZ #11589 .*/ - TEST_if_f (jn, 2, 2.4048255576957729L, 0.43175480701968038399746111312430703L), - TEST_if_f (jn, 3, 2.4048255576957729L, 0.19899990535769083404042146764530813L), - TEST_if_f (jn, 4, 2.4048255576957729L, 0.647466661641779720084932282551219891E-1L), - TEST_if_f (jn, 5, 2.4048255576957729L, 0.163892432048058525099230549946147698E-1L), - TEST_if_f (jn, 6, 2.4048255576957729L, 0.34048184720278336646673682895929161E-2L), - TEST_if_f (jn, 7, 2.4048255576957729L, 0.60068836573295394221291569249883076E-3L), - TEST_if_f (jn, 8, 2.4048255576957729L, 0.92165786705344923232879022467054148E-4L), - TEST_if_f (jn, 9, 2.4048255576957729L, 0.12517270977961513005428966643852564E-4L), - - TEST_if_f (jn, 2, 0x1.ffff62p+99L, -4.43860668048170034334926693188979974489e-16L), - TEST_if_f (jn, 2, 0x1p127L, -6.0784021821505059176832624052765568656702e-20L), -#ifndef TEST_FLOAT - TEST_if_f (jn, 2, 0x1p1023L, 1.5665258060609012834424478437196679802783e-155L), -#endif -#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384 - TEST_if_f (jn, 2, 0x1p16383L, -9.5859502826270374691362975419147645151233e-2467L), -#endif + AUTO_TESTS_if_f (jn, tonearest), }; static void @@ -13048,14 +12995,6 @@ static const struct test_if_f_data yn_test_data[] = TEST_if_f (yn, 0, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), TEST_if_f (yn, 0, plus_infty, 0), - TEST_if_f (yn, 0, 0.125L, -1.38968062514384052915582277745018693L), - TEST_if_f (yn, 0, 0.75L, -0.137172769385772397522814379396581855L), - TEST_if_f (yn, 0, 1.0, 0.0882569642156769579829267660235151628L), - TEST_if_f (yn, 0, 1.5, 0.382448923797758843955068554978089862L), - TEST_if_f (yn, 0, 2.0, 0.510375672649745119596606592727157873L), - TEST_if_f (yn, 0, 8.0, 0.223521489387566220527323400498620359L), - TEST_if_f (yn, 0, 10.0, 0.0556711672835993914244598774101900481L), - /* yn (1, x) == y1 (x) */ TEST_if_f (yn, 1, -1.0, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), TEST_if_f (yn, 1, -max_value, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), @@ -13065,14 +13004,6 @@ static const struct test_if_f_data yn_test_data[] = TEST_if_f (yn, 1, plus_infty, 0), TEST_if_f (yn, 1, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - TEST_if_f (yn, 1, 0.125L, -5.19993611253477499595928744876579921L), - TEST_if_f (yn, 1, 0.75L, -1.03759455076928541973767132140642198L), - TEST_if_f (yn, 1, 1.0, -0.781212821300288716547150000047964821L), - TEST_if_f (yn, 1, 1.5, -0.412308626973911295952829820633445323L), - TEST_if_f (yn, 1, 2.0, -0.107032431540937546888370772277476637L), - TEST_if_f (yn, 1, 8.0, -0.158060461731247494255555266187483550L), - TEST_if_f (yn, 1, 10.0, 0.249015424206953883923283474663222803L), - /* yn (-1, x) == -y1 (x). */ TEST_if_f (yn, -1, -1.0, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), TEST_if_f (yn, -1, -max_value, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), @@ -13081,7 +13012,6 @@ static const struct test_if_f_data yn_test_data[] = TEST_if_f (yn, -1, -0.0, plus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE), TEST_if_f (yn, -1, plus_infty, minus_zero), TEST_if_f (yn, -1, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - TEST_if_f (yn, -1, 1.0, 0.781212821300288716547150000047964821L), /* yn (2, x). */ TEST_if_f (yn, 2, -1.0, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), @@ -13110,36 +13040,11 @@ static const struct test_if_f_data yn_test_data[] = TEST_if_f (yn, 3, plus_infty, 0), TEST_if_f (yn, 3, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - TEST_if_f (yn, 3, 0.125L, -2612.69757350066712600220955744091741L), - TEST_if_f (yn, 3, 0.75L, -12.9877176234475433186319774484809207L), - TEST_if_f (yn, 3, 1.0, -5.82151760596472884776175706442981440L), - TEST_if_f (yn, 3, 2.0, -1.12778377684042778608158395773179238L), - TEST_if_f (yn, 3, 10.0, -0.251362657183837329779204747654240998L), - /* yn (10, x) */ TEST_if_f (yn, 10, plus_infty, 0), TEST_if_f (yn, 10, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - TEST_if_f (yn, 10, 0.125L, -127057845771019398.252538486899753195L), - TEST_if_f (yn, 10, 0.75L, -2133501638.90573424452445412893839236L), - TEST_if_f (yn, 10, 1.0, -121618014.278689189288130426667971145L), - TEST_if_f (yn, 10, 2.0, -129184.542208039282635913145923304214L), - TEST_if_f (yn, 10, 10.0, -0.359814152183402722051986577343560609L), - - TEST_if_f (yn, -10, 1.0, -121618014.278689189288130426667971145L), - - /* Check whether yn returns correct value for LDBL_MIN, DBL_MIN, - and FLT_MIN. See Bug 14173. */ - TEST_if_f (yn, 10, min_value, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE), - - TEST_if_f (yn, 2, 0x1.ffff62p+99L, -5.5244413477397111790415387179517953221757e-16L), - TEST_if_f (yn, 2, 0x1p127L, 6.8569250690166637098111268958532649249771e-21L), -#ifndef TEST_FLOAT - TEST_if_f (yn, 2, 0x1p1023L, -8.2687542933709649327986678723012001545638e-155L), -#endif -#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384 - TEST_if_f (yn, 2, 0x1p16383L, 3.8895531955766020648617743624167352352217e-2467L), -#endif + AUTO_TESTS_if_f (yn, tonearest), }; static void |