You could also check the values before doing the calculation:
I am of the school that checking for potentially problematic conditions is best done
beforehand. The values you will be working with will be certain and the tests unambiguous.
Trying to identify a problem afterwards means you may well have entered the twilight zone - an area of uncertainty that may vary between platforms. Also, in an abnormal situation, it is rather unwise to depend on a specific response for guaranteed operation. If different platforms give different responses, you are not going to have guaranteed operation. It is much better to deal with potential problems than real ones.
Aside from this, there is also the issue of coding clarity and documentation. Ii's a lot easier for you (or anybody) who comes along at a later date that looks at the code to read an explicit value check, rather than a verbose description of the 'default behaviour' you are relying on (assuming you would be so disciplined to do so).
In short, it is better programming practice to check your values before using them.
IMHO.