Ethiopian multiplication: Difference between revisions

m
(→‎{{header|MMIX}}: comment correction)
Line 909:
<lang ocaml>let ethiopicmult x y =
let rec aux plier pliand acc =
if plier = 0 then
then (acc)
else if plier mod 2 = 0 then
aux (plier / 2) (pliand * 2) acc
else
auxif (plier /mod 2) (pliand= * 2) (acc + pliand)0
then aux (plier / 2) (pliand * 2) acc
else aux (plier / 2) (pliand * 2) (acc + pliand)
in
aux x y 0</lang>
 
'''Usage example''' from the interpreter