I'm writing a program that needs to compute the ratio of the difference between two numbers over the second number. i.e.,
(B-A)/A
I'm trying to figure out what's the best way to handle the case of 0 denominator. Practically, I could have a special case for A == 0 and set it to a very small number when that happens. However, how do I pick what number to use? Is there a generally accepted way of handling this?