The function f(x) takes a numerical input x and doubles it if x is positive, or negates it if x is negative.
