diff options
author | thevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2008-11-14 14:29:31 +0000 |
---|---|---|
committer | thevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2008-11-14 14:29:31 +0000 |
commit | dfbe44ab7c4dd12cab82a69fbc33fd06fc1f06ad (patch) | |
tree | f69ce457a790af1d33c35ab09130543d5ff42c6c | |
parent | 69cacfa6aa5fed8a07f97fe96d2fdb4dc579b5e5 (diff) | |
download | mpc-dfbe44ab7c4dd12cab82a69fbc33fd06fc1f06ad.tar.gz |
tests/tmul.c: Add bug for wrong inexact value returned by mpc_mul_karatsuba.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@307 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r-- | tests/tmul.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/tmul.c b/tests/tmul.c index 23d2292..8af2f0a 100644 --- a/tests/tmul.c +++ b/tests/tmul.c @@ -117,8 +117,18 @@ check_regular (void) testmul (145, 1816, 0, 169, 8, 24); testmul (145, 1816, 848, 0, 8, 24); - mpc_init (x); - mpc_init (y); + mpc_init2 (x, 1000); + mpc_init2 (y, 1000); + + /* Bug 20081114: mpc_mul_karatsuba returned wrong inexact value for + imaginary part */ + mpc_set_prec (x, 7); + mpc_set_prec (y, 7); + mpfr_set_str (MPC_RE (x), "0xB4p+733", 16, GMP_RNDN); + mpfr_set_str (MPC_IM (x), "0x90p+244", 16, GMP_RNDN); + mpfr_set_str (MPC_RE (y), "0xACp-471", 16, GMP_RNDN); + mpfr_set_str (MPC_IM (y), "-0xECp-146", 16, GMP_RNDN); + cmpmul (x, y, MPC_RNDNN); for (prec = 2; prec < 1000; prec = prec * 1.1 + 1) { |