Arithmetic/Rational: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: corrected two misspellings of numerator. -- ~~~~)
Line 2,318: Line 2,318:


=={{header|Ruby}}==
=={{header|Ruby}}==
Ruby has a Rational class in it's core since 1.9. Before that it was in standard library:
Ruby's standard library already implements a Rational class:
<lang ruby>require 'rational'
<lang ruby>require 'rational' #Only needed in Ruby < 1.9


for candidate in 2 .. 2**19:
for candidate in 2 .. 2**19: