Method: MoreMath::Functions.logb
- Defined in:
- lib/more_math/functions.rb
.logb(x, b = 2) ⇒ Object
Returns the base b logarithm of the number x. b defaults to base 2, binary logarithm.
184 185 186 |
# File 'lib/more_math/functions.rb', line 184 def logb(x, b = 2) Math.log(x) / Math.log(b) end |