The function takes in numerical inputs and returns their absolute value, except for inputs equal to 0, which return infinity.

