The function takes a single numerical input and returns twice the input value, unless the input is negative, in which case it returns a very small negative value that is approximately half the absolute value of the input.

