Browse Source

Refactoring: removed multiplication of octal numbers function

remotes/origin/multiplication
fdai7930 11 months ago
parent
commit
59e2738357
  1. 13
      src/multiplication.c
  2. 1
      src/multiplication.h

13
src/multiplication.c

@ -143,19 +143,6 @@ int multi_recursive_optimized(int num1, int num2) {
return result; return result;
} }
int multi_octal_numbers(int num1, int num2) {
int result = 0;
while (num2 != 0) {
if (num2 & 1) {
result += num1;
}
num1 <<= 3; // Décalage octal
num2 >>= 1;
}
return result;
}
int multi_hex_numbers(int num1, int num2) { int multi_hex_numbers(int num1, int num2) {
int result = 0; int result = 0;
while (num2 != 0) { while (num2 != 0) {

1
src/multiplication.h

@ -22,7 +22,6 @@ int multi_by_odd(int num, int factor);
int multi_binary_enumeration(int num1, int num2); int multi_binary_enumeration(int num1, int num2);
int multi_differences(int num1, int num2); int multi_differences(int num1, int num2);
int multi_recursive_optimized(int num1, int num2); int multi_recursive_optimized(int num1, int num2);
int multi_octal_numbers(int num1, int num2);
int multi_hex_numbers(int num1, int num2); int multi_hex_numbers(int num1, int num2);
int multi_exponentiation(int base, int exponent); int multi_exponentiation(int base, int exponent);
int multi_by_euler_prime(int num); int multi_by_euler_prime(int num);

Loading…
Cancel
Save