Safe Haskell | None |
---|---|

Language | Haskell2010 |

- integerLogBase# :: Integer -> Integer -> Int#
- integerLog2# :: Integer -> Int#
- wordLog2# :: Word# -> Int#

# Documentation

integerLogBase# :: Integer -> Integer -> Int# Source #

Calculate the integer logarithm for an arbitrary base. The base must be greater than 1, the second argument, the number whose logarithm is sought, should be positive, otherwise the result is meaningless.

base ^ integerLogBase# base m <= m < base ^ (integerLogBase# base m + 1)

for `base > 1`

and `m > 0`

.