function f(x, from, to) { var y = 0; for (var i=from; i