diff --git a/lib/mathn.rb b/lib/mathn.rb index aae4620..398188c 100644 --- a/lib/mathn.rb +++ b/lib/mathn.rb @@ -53,7 +53,7 @@ unless defined?(Math.exp!) end ## -# When mathn is required, Fixnum's division and exponentiation are enhanced to +# When mathn is required, Fixnum's division is enhanced to # return more precise values from mathematical expressions. # # 2/3*3 # => 0 @@ -62,27 +62,7 @@ end class Fixnum remove_method :/ - - ## - # +/+ defines the Rational division for Fixnum. - # - # 1/3 # => (1/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 ##