RosettaCodeData/Task/Zero-to-the-zero-power/Ruby/zero-to-the-zero-power.rb
2023-07-01 13:44:08 -04:00

5 lines
135 B
Ruby

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