diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2021-02-15 14:27:53 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2021-02-15 14:27:53 +0000 |
commit | 614272c7b358f328028401ef94ab92361207e032 (patch) | |
tree | 8f58bab81962939f3223131b9dd861e4aa9a5972 /tests | |
parent | b0bbbc1a662fed3e657cc7639cc929a8616c00b7 (diff) | |
download | mpfr-614272c7b358f328028401ef94ab92361207e032.tar.gz |
[src/jyn_asympt.c] fixed bug when s=0 at the end of the for loop
[tests/tj1.c] added corresponding non-regression test
git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14431 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tj1.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/tj1.c b/tests/tj1.c index eeb722eee..0a2709143 100644 --- a/tests/tj1.c +++ b/tests/tj1.c @@ -72,6 +72,26 @@ test_small (void) mpfr_clear (y); } +/* a test that fails with GMP_CHECK_RANDOMIZE=1613146232984428 + on revision 14429 */ +static void +bug20210215 (void) +{ + mpfr_t x, y; + int inex; + + mpfr_init2 (x, 221); + mpfr_init2 (y, 1); + mpfr_set_str (x, "1.6484611511696130037307738844228498447763863563070374544054791168614e+01", 10, MPFR_RNDN); + mpfr_clear_flags (); + inex = mpfr_j1 (y, x, MPFR_RNDZ); + MPFR_ASSERTN (mpfr_cmp_si_2exp (y, -1, -9) == 0); + MPFR_ASSERTN (inex > 0); + MPFR_ASSERTN (__gmpfr_flags == MPFR_FLAGS_INEXACT); + mpfr_clear (x); + mpfr_clear (y); +} + int main (int argc, char *argv[]) { @@ -79,6 +99,8 @@ main (int argc, char *argv[]) tests_start_mpfr (); + bug20210215 (); + test_small (); mpfr_init (x); |