The function f(x) takes a numerical input and returns a value that is twice the input for values outside of the interval -50 to 50. For values within this interval, the function returns values that are half the absolute value of the input.
