Ethiopian multiplication: Difference between revisions

Content added Content deleted
(Use separate functions for doubling, halving, and checking if a number is even)
(Correct parameter type)
Line 1,453:
Ethiopian Multiplication is another name for the peasant multiplication:
 
<lang seed7>const proc: double (in varinout integer: a) is func
begin
a *:= 2;
end func;
 
const proc: halve (in varinout integer: a) is func
begin
a := a div 2;