benchmark/is_odd_or_even #2

Merged
Fabel merged 2 commits from benchmark/is_odd_or_even into develop 2025-02-10 17:16:22 +00:00
5 changed files with 4 additions and 3 deletions
Showing only changes of commit 4d6684d4b6 - Show all commits

View File

@ -1,3 +1,4 @@
from fabelous_math import is_even, is_odd
print(is_even(5))
print(is_odd(19))

View File

@ -2,10 +2,10 @@
namespace simple_functions {
bool is_even(long long number) {
return (number & 1) == 0;
return (number & 1) == 0;
}
bool is_odd(long long number) {
return (number & 1) == 1;
return (number & 1);
}
}

View File