My Adventures in Math and Technology
© Daniel Marvin.
function peasantmult(x, y) x == zero(x) && return x xp = fld(x, 2) yp = y + y product = peasantmult(xp, yp) if isodd(x) product += y end return product end