If I divide by 0, I get either a ZeroDivisionError, Infinity or NaN depending on what is divided.
ruby-1.9.2-p180 :018 > 0.0 / 0
=> NaN
ruby-1.9.2-p180 :020 > 3.0 / 0
=> Infinity
ruby-1.9.2-p180 :021 > 3 / 0
ZeroDivisionError: divided by 0
I understand that 0.0 / 0 is not an Infinity (in math terms), while 3.0 / 0 is but why then isn't 3 / 0 an Infinity? Why dividing an integer throws an exception but dividing a float doesn't?