Maintenance of Ruby 2.0.0 ended on February 24, 2016. Read more

In Files

  • mathn.rb

Parent

Methods

Class/Module Index [+]

Quicksearch

Float

When mathn is required, Float is changed to handle Complex numbers.

Public Instance Methods

**(other) click to toggle source

Exponentiate by other

 
               # File mathn.rb, line 316
def ** (other)
  if self < 0 && other.round != other
    Complex(self, 0.0) ** other
  else
    power!(other)
  end
end
            
Also aliased as: power!
power!(other) click to toggle source
Alias for: **