diff --git a/lib/mathn.rb b/lib/mathn.rb index 398188c..dfbc9b2 100644 --- a/lib/mathn.rb +++ b/lib/mathn.rb @@ -66,32 +66,14 @@ class Fixnum end ## -# When mathn is required Bignum's division and exponentiation are enhanced to +# When mathn is required Bignum's division is enhanced to # return more precise values from mathematical expressions. +# +# (2**72) / ((2**70) * 3) # => 4/3 class Bignum remove_method :/ - - ## - # +/+ defines the Rational division for Bignum. - # - # (2**72) / ((2**70) * 3) # => 4/3 - - alias / quo - - alias power! ** unless method_defined? :power! - - ## - # Exponentiate by +other+ - - def ** (other) - if self < 0 && other.round != other - Complex(self, 0.0) ** other - else - power!(other) - end - end - + alias :/ :quo end ##