log

fun log(x: Long, base: Int): Int

Returns x <= 0 ? 0 : Math.floor(Math.log(x) / Math.log(base))

Parameters

base

must be > 1


fun log(x: Int, base: Int): Int


fun log(base: Double, x: Double): Double

Calculates logarithm in a given base with doubles.