summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-08 20:38:53 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-08 20:38:53 +0000
commit22767ffd13d17dd5b2dbdfcc9c8a92b23637a366 (patch)
tree340faa6be4a8de1d97e89d8c968dc3aa50b36a6b /bignum.c
parent9f9ebe4ebae2769be512e46e720c3e523b7f7479 (diff)
* bignum.c (bigmul0): disable big_mul_toom3_temporalily.
[ruby-core:48552] [Bug #7242] * test/ruby/test_bignum.rb (test_mul_large_numbers): add a test for bigmul1_toom3 suggested in [Bug #7242]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/bignum.c b/bignum.c
index d30f89eff4..d2e5f944ac 100644
--- a/bignum.c
+++ b/bignum.c
@@ -2617,13 +2617,8 @@ bigmul0(VALUE x, VALUE y)
/* balance multiplication by slicing y when x is much smaller than y */
if (2 * xn <= yn) return bigmul1_balance(x, y);
- if (xn < TOOM3_MUL_DIGITS) {
- /* multiplication by karatsuba method */
- return bigmul1_karatsuba(x, y);
- }
- else if (3*xn <= 2*(yn + 2))
- return bigmul1_balance(x, y);
- return bigmul1_toom3(x, y);
+ /* multiplication by karatsuba method */
+ return bigmul1_karatsuba(x, y);
}
/*