math.big: fix toom-cook 3-way multiplication (#24888)

This commit is contained in:
Mike 2025-07-13 18:36:46 +03:00 committed by GitHub
parent 54fec7b772
commit f06def7d6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 34 additions and 14 deletions

View file

@ -108,9 +108,9 @@ fn subtract_digit_array(operand_a []u32, operand_b []u32, mut storage []u32) {
shrink_tail_zeros(mut storage)
}
const karatsuba_multiplication_limit = 240
const karatsuba_multiplication_limit = 70
const toom3_multiplication_limit = 10_000
const toom3_multiplication_limit = 360
@[inline]
fn multiply_digit_array(operand_a []u32, operand_b []u32, mut storage []u32) {