summaryrefslogtreecommitdiff
path: root/tests/tsub1sp.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2018-08-21 11:01:14 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2018-08-21 11:01:14 +0000
commit17cc030d741c2c2929cda9206675bb30e93438c0 (patch)
treef8eeb6c12cb8e7eef6b869c08a100b4ceca04d55 /tests/tsub1sp.c
parent95a77f7e3e57eb78a70bdf636b3b93625a91a508 (diff)
downloadmpfr-17cc030d741c2c2929cda9206675bb30e93438c0.tar.gz
[tests/tsub1sp.c] added a test for a bug in mpfr_sub1sp (to be fixed)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12997 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tsub1sp.c')
-rw-r--r--tests/tsub1sp.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/tsub1sp.c b/tests/tsub1sp.c
index 66b845000..7463ee9be 100644
--- a/tests/tsub1sp.c
+++ b/tests/tsub1sp.c
@@ -370,6 +370,25 @@ bug20180217 (mpfr_prec_t pmax)
}
}
+/* bug in revision 12985 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 +396,7 @@ main (void)
tests_start_mpfr ();
+ bug20180813 ();
bug20180217 (1024);
coverage ();
compare_sub_sub1sp ();