function norm (x,y) return math.sqrt(x^2+y^2); end function twice(x) return 2.0 * x; end