Tag peasant multiply

Russian Peasant Multiplication

Let \(x,y\) be two non-negative integers. We want to compute \(p\), the product: Set p=0 While x > 0: if x is odd: p = p + y x = x/2...