From b0b32c18d993ec211cfbd3aa7e6f25432f534c83 Mon Sep 17 00:00:00 2001 From: fdai7930 Date: Thu, 8 Feb 2024 12:43:20 +0100 Subject: [PATCH] bernouli multiplication added --- src/multiplication.c | 7 ++++++- src/multiplication.h | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/multiplication.c b/src/multiplication.c index 15884c2..6a3c5a3 100644 --- a/src/multiplication.c +++ b/src/multiplication.c @@ -205,7 +205,12 @@ int repeated_division_multiply(int num1, int num2) { num2 <<= 1; } return result; -} +} + +int bernoulli_multiply(int num, int bernoulli) { + return num * bernoulli; +} + diff --git a/src/multiplication.h b/src/multiplication.h index 1d81954..97be960 100644 --- a/src/multiplication.h +++ b/src/multiplication.h @@ -28,6 +28,8 @@ int multiply_exponentiation(int base, int exponent); int multiply_by_euler_prime(int num); int fibonacci_multiply(int num, int fib); int repeated_division_multiply(int num1, int num2); +int bernoulli_multiply(int num, int bernoulli); +