log
Computes the logarithm of the value x to the given base.
Special cases:
log(x, b)isNaNif eitherxorbareNaNlog(x, b)isNaNwhenx < 0orb <= 0orb == 1.0log(+Inf, +Inf)isNaNlog(+Inf, b)is+Infforb > 1and-Infforb < 1log(0.0, b)is-Infforb > 1and+Infforb > 1
See also logarithm functions for common fixed bases: ln, log10 and log2.
Since Kotlin
1.2Computes the logarithm of the value x to the given base.
Special cases:
log(x, b)isNaNif eitherxorbareNaNlog(x, b)isNaNwhenx < 0orb <= 0orb == 1.0log(+Inf, +Inf)isNaNlog(+Inf, b)is+Infforb > 1and-Infforb < 1log(0.0, b)is-Infforb > 1and+Infforb > 1
See also logarithm functions for common fixed bases: ln, log10 and log2.
Since Kotlin
1.2Computes the logarithm of the value x to the given base.
Special cases:
log(x, b)isNaNif eitherxorbareNaNlog(x, b)isNaNwhenx < 0orb <= 0orb == 1.0log(+Inf, +Inf)isNaNlog(+Inf, b)is+Infforb > 1and-Infforb < 1log(0.0, b)is-Infforb > 1and+Infforb > 1
See also logarithm functions for common fixed bases: ln, log10 and log2.