First commit of partial RosettaCode contents.
Pushing this for testing purposes. Lots of work still needed.
This commit is contained in:
commit
1e05ecd7ee
781 changed files with 9080 additions and 0 deletions
10
Task/Infinity/Ruby/infinity.rb
Normal file
10
Task/Infinity/Ruby/infinity.rb
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
a = 1.0/0 # => Infinity
|
||||
a.finite? # => false
|
||||
a.infinite? # => 1
|
||||
|
||||
a = -1/0.0 # => -Infinity
|
||||
a.infinite? # => -1
|
||||
|
||||
a = Float::MAX # => 1.79769313486232e+308
|
||||
a.finite? # => true
|
||||
a.infinite? # => nil
|
||||
Loading…
Add table
Add a link
Reference in a new issue