From adeca343a1a55fe3992722577268cf0aec4a5b65 Mon Sep 17 00:00:00 2001 From: Alberto Bertogli Date: Mon, 3 Oct 2005 05:51:50 +0000 Subject: [PATCH] Renombrar "divide_n_conquer" por "karatsuba". --- src/number.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/number.h b/src/number.h index 3a42d7e..4b77f22 100644 --- a/src/number.h +++ b/src/number.h @@ -274,7 +274,7 @@ std::pair< number< N, E >, number< N, E > > number< N, E >::split() const // es el algoritmo de divisiĆ³n y conquista, que se llama recursivamente template < typename N, typename E > -number < N, E > divide_n_conquer(number< N, E > u, number< N, E > v) +number < N, E > karatsuba(number< N, E > u, number< N, E > v) { typedef number< N, E > num_type; @@ -297,9 +297,9 @@ number < N, E > divide_n_conquer(number< N, E > u, number< N, E > v) // m = u1*v1 // d = u2*v2 // h = (u1+v1)*(u2+v2) = u1*u2+u1*v2+u2*v1+u2*v2 - num_type m = divide_n_conquer(u12.first, v12.first); - num_type d = divide_n_conquer(u12.second, v12.second); - num_type h = divide_n_conquer(u12.first + v12.first, + num_type m = karastuba(u12.first, v12.first); + num_type d = karastuba(u12.second, v12.second); + num_type h = karastuba(u12.first + v12.first, u12.second + v12.second); // H-D-M = u1*u2+u1*v2+u2*v1+u2*v2 - u2*v2 - u1*v1 = u1*v2+u2*v1 -- 2.43.0