The function f(x) takes a numerical input and returns its squared value, except when the input is 0, in which case the output is -18.0.

