The function f(x) takes a numerical input x and returns 2x if x is positive, and -2x if x is negative.
