Jump to content

Ethiopian multiplication: Difference between revisions

m
→‎{{header|Bash}}: logical operations replacing "modulo loss workround"
m (→‎{{header|Bash}}: removed modulus from is_even to fit with the spirit of the problem)
m (→‎{{header|Bash}}: logical operations replacing "modulo loss workround")
Line 269:
is_even() {
local n=$1
[ $(double $( halve $n & 1 ) ) -eq $n ]
}
 
Cookies help us deliver our services. By using our services, you agree to our use of cookies.