diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-08-21 13:18:23 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-08-21 13:18:23 +0000 |
commit | 1ee47110b72a5a768b2683d2cfaaeb700dea1563 (patch) | |
tree | d3e058e238920d23695e886dfe04eeae0cfa2c75 /tests/tsub1sp.c | |
parent | b7979898ecf162ea205241538ef06b696a861b4e (diff) | |
download | mpfr-1ee47110b72a5a768b2683d2cfaaeb700dea1563.tar.gz |
[tests/tsub1sp.c] Added a test by merging r12997 from the trunk, and
modified the comment to say that the bug is only in the trunk.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12999 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tsub1sp.c')
-rw-r--r-- | tests/tsub1sp.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/tsub1sp.c b/tests/tsub1sp.c index ff3c1506b..f9f50da15 100644 --- a/tests/tsub1sp.c +++ b/tests/tsub1sp.c @@ -370,6 +370,26 @@ bug20180217 (mpfr_prec_t pmax) } } +/* bug in revision 12985 (trunk only) with tlog and + GMP_CHECK_RANDOMIZE=1534111552615050 */ +static void +bug20180813 (void) +{ + mpfr_t a, b, c; + + mpfr_init2 (a, 194); + mpfr_init2 (b, 194); + mpfr_init2 (c, 194); + mpfr_set_str_binary (b, "0.10000111101000100000010000100010110111011100110100000101100111000010101000110110010101011101101011110110001000111001000010110010111010010100011011010100001010001110000101000010101110100110001000E7"); + mpfr_set_str_binary (c, "0.10000000000000000100001111010001000000100001000101101110111001101000001011001110000101010001101100101010111011010111101100010001110010000101100101110100101000110110101000010100011100001010000101E24"); + mpfr_sub (a, b, c, MPFR_RNDN); + mpfr_set_str_binary (b, "-0.11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111E23"); + MPFR_ASSERTN(mpfr_equal_p (a, b)); + mpfr_clear (a); + mpfr_clear (b); + mpfr_clear (c); +} + int main (void) { @@ -377,6 +397,7 @@ main (void) tests_start_mpfr (); + bug20180813 (); bug20180217 (1024); coverage (); compare_sub_sub1sp (); |