RosettaCodeData/Task/Zero-to-the-zero-power/Ruby/zero-to-the-zero-power.rb
2015-02-20 09:02:09 -05:00

5 lines
139 B
Ruby

require 'bigdecimal'
[0, 0.0, Complex(0), Rational(0), BigDecimal.new("0")].each do |n|
printf "%10s: ** -> %s\n" % [n.class, n**n]
end