The function f(x) takes a numerical input x and multiplies it by 2, except for negative input values, which are multiplied by -2.
