diff --git a/src/multiplication.c b/src/multiplication.c index d6ba3fa..398b12e 100644 --- a/src/multiplication.c +++ b/src/multiplication.c @@ -219,7 +219,7 @@ float power_multi(float base, int exponent) { return result; } -int bitwise_multi(int num1, int num2) { +int bitwisee_multi(int num1, int num2) { int result = 0; while (num1) { if (num1 & 1) { @@ -255,6 +255,10 @@ int karatsuba_multi(int num1, int num2) { return ac * (int)pow(10, 2 * m2) + ad_bc * (int)pow(10, m2) + bd; } +int multiply_by_riesel_prime(int num) { + return (num << 2) + (num << 3) - (num << 1) - num; +} + diff --git a/src/multiplication.h b/src/multiplication.h index 2e9abdb..547ebe3 100644 --- a/src/multiplication.h +++ b/src/multiplication.h @@ -30,8 +30,9 @@ int fibonacci_multi(int num, int fib); int repeated_division_multi(int num1, int num2); int bernoulli_multi(int num, int bernoulli); float power_multi(float base, int exponent); -int bitwise_multi(int num1, int num2); +int bitwisee_multi(int num1, int num2); int karatsuba_multi(int num1, int num2); +int multiply_by_riesel_prime(int num);