The function f(x) takes a numerical input x and returns x squared for values within the range [-128, 128]. For values outside of this range, the function returns a negative value that is equal in magnitude to the input value.

