The function takes a numerical input and doubles it. If the input is negative, the function adds 0.5 to the result.

