Add function to Math module : Math extensions « Development « Ruby






Add function to Math module


module Math
  def Math.logb(num, base)
    log(num) / log(base)
  end
end

 








Related examples in the same category

1.Your own math function
2.Get mean value
3.Get hmean value
4.Return the gmean value
5.Get the median value
6.Get the mode value
7.Get variance value
8.Get sigma value