The function f(x) takes a numerical input x and returns the result of multiplying x by a constant factor, except when x is negative, in which case the function negates x before multiplying it by the factor.

