Multiplication algorithm: Difference between revisions

Content deleted Content added
Undid revision 698582797 by 203.13.144.44 (talk) Not an improvement
Line 61:
carry = 0
for a_i = 1 to p //for all digits in a
product[a_i + b_i - 1] += carry + a[a_iai] * b[b_ibi]
carry = product[ai + bi - 1] / base
product[a_i + b_i - 1] = product[a_iai + b_ibi - 1] mod base
product[b_i + p] += carry // last digit comes from final carry
return product