Project

General

Profile

Bug #10086 » Remove_Float#power_from_mathn.patch

gogotanaka (Kazuki Tanaka), 07/23/2014 11:58 AM

View differences:

lib/mathn.rb
module_function :sqrt
module_function :rsqrt
end
##
# When mathn is required, Float is changed to handle Complex numbers.
class Float
alias power! **
##
# Exponentiate by +other+
def ** (other)
if self < 0 && other.round != other
Complex(self, 0.0) ** other
else
power!(other)
end
end
end
(3-3/7)