comparison bn_mp_toom_mul.c @ 190:d8254fc979e9 libtommath-orig LTM_0.35

Initial import of libtommath 0.35
author Matt Johnston <matt@ucc.asn.au>
date Fri, 06 May 2005 08:59:30 +0000
parents d29b64170cf0
children
comparison
equal deleted inserted replaced
142:d29b64170cf0 190:d8254fc979e9
15 * Tom St Denis, [email protected], http://math.libtomcrypt.org 15 * Tom St Denis, [email protected], http://math.libtomcrypt.org
16 */ 16 */
17 17
18 /* multiplication using the Toom-Cook 3-way algorithm 18 /* multiplication using the Toom-Cook 3-way algorithm
19 * 19 *
20 * Much more complicated than Karatsuba but has a lower asymptotic running time of 20 * Much more complicated than Karatsuba but has a lower
21 * O(N**1.464). This algorithm is only particularly useful on VERY large 21 * asymptotic running time of O(N**1.464). This algorithm is
22 * inputs (we're talking 1000s of digits here...). 22 * only particularly useful on VERY large inputs
23 * (we're talking 1000s of digits here...).
23 */ 24 */
24 int mp_toom_mul(mp_int *a, mp_int *b, mp_int *c) 25 int mp_toom_mul(mp_int *a, mp_int *b, mp_int *c)
25 { 26 {
26 mp_int w0, w1, w2, w3, w4, tmp1, tmp2, a0, a1, a2, b0, b1, b2; 27 mp_int w0, w1, w2, w3, w4, tmp1, tmp2, a0, a1, a2, b0, b1, b2;
27 int res, B; 28 int res, B;