elif n == 1: return v else: w = u / v u = v v = w return w