The function f(x) takes a numerical input x and doubles it if x is positive, and returns the opposite of x if x is negative.

