I learned something simple today. It seems like I should have known this already but I just realized that doing a divide by 0 against a double will not result in a DivideByZeroException. This may be good or bad depending on your application but if you’re not aware of it it can result in some strange behavior.
Actually the result is only NaN if you divide 0.0 / 0.0. If you divide 1.0 / 0.0 you result in infinity.
You must log in to post a comment.