class Fixnum
When mathn is required, Fixnum’s division and exponentiation are enhanced to return more precise values from mathematical expressions.
2/3*3 # => 0 require 'mathn' 2/3*3 # => 2
Public Instance Methods
**(other)
click to toggle source
Exponentiate by other
# File lib/rubysl/mathn/mathn.rb, line 75 def ** (other) if self < 0 && other.round != other Complex(self, 0.0) ** other else power!(other) end end
Also aliased as: power!