RosettaCodeData/Task/Arithmetic-Complex/Ruby/arithmetic-complex-2.rb
2023-07-01 13:44:08 -04:00

4 lines
204 B
Ruby

# Other ways to find the multiplicative inverse:
puts 1.quo a # always works
puts 1.0 / a # works, but forces floating-point math
puts 1 / a # might truncate to integer