Created
July 18, 2013 11:11
-
-
Save rentalcustard/6028502 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~> irb | |
1.9.3-p194 :001 > 10.0 / 0.0 | |
=> Infinity | |
1.9.3-p194 :002 > 0.0 / 0.0 | |
=> NaN | |
1.9.3-p194 :003 > 10 / 0 | |
ZeroDivisionError: divided by 0 | |
from (irb):3:in `/' | |
from (irb):3 | |
from /Users/thomasstuart/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in `<main>' | |
1.9.3-p194 :004 > 10 / 0.0 | |
=> Infinity | |
1.9.3-p194 :005 > Nan | |
NameError: uninitialized constant Nan | |
from (irb):5 | |
from /Users/thomasstuart/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in `<main>' | |
1.9.3-p194 :006 > NaN | |
NameError: uninitialized constant NaN | |
from (irb):6 | |
from /Users/thomasstuart/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in `<main>' | |
1.9.3-p194 :007 > Infinity | |
NameError: uninitialized constant Infinity | |
from (irb):7 | |
from /Users/thomasstuart/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in `<main>' | |
1.9.3-p194 :008 > infin = 10 / 0.0 | |
=> Infinity | |
1.9.3-p194 :009 > infin | |
=> Infinity | |
1.9.3-p194 :010 > infin.class | |
=> Float | |
1.9.3-p194 :011 > nan = 0.0 / 0.0 | |
=> NaN | |
1.9.3-p194 :012 > nan.class | |
=> Float |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment