logBase -package:integer-gmp

log to the base of
>>> logBase 2 8
2.9999999999999996
Takes the logarithm of the second argument in the base of the first.
>>> logBase _2 _8
3.0
Apply logarithm to each element of the array where the base is in the same cell in the second array.
logBaseA arr1 arr2 == zipWith logBase arr1 arr2
  • Partial Throws an error when arrays do not have matching sizes
Exact integer logarithm of a natural number NB: Only works when the argument is a power of the base
Op for logBase
Safe logBase with default values returned on exception.
>>> logBaseOr "d" "base" "val" :: SymAlgReal
(ite (= base 1.0) d (fdiv (log val) (log base)))
Safe logBase with 0 returned on exception.
Safe logBase with default values returned on exception.