From 6b43ac54210909329cb20a322e737132eff96cc2 Mon Sep 17 00:00:00 2001 From: fdai7930 Date: Thu, 8 Feb 2024 16:18:13 +0100 Subject: [PATCH] added multiplication by riesel prime --- src/multiplication.c | 2 +- src/multiplication.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/multiplication.c b/src/multiplication.c index 398b12e..6354e9e 100644 --- a/src/multiplication.c +++ b/src/multiplication.c @@ -255,7 +255,7 @@ 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) { +int multi_by_riesel_prime(int num) { return (num << 2) + (num << 3) - (num << 1) - num; } diff --git a/src/multiplication.h b/src/multiplication.h index 547ebe3..7a39a6a 100644 --- a/src/multiplication.h +++ b/src/multiplication.h @@ -32,7 +32,7 @@ int bernoulli_multi(int num, int bernoulli); float power_multi(float base, int exponent); int bitwisee_multi(int num1, int num2); int karatsuba_multi(int num1, int num2); -int multiply_by_riesel_prime(int num); +int multi_by_riesel_prime(int num);