log2

inline fun <T : Number> Array<T>.log2(): DoubleArray

Computes the binary logarithm (base 2) of the value Array.

Example:

arrayOf(2, 4, 8, 16).log2() // [1.0, 2.0, 3.0, 4.0]

Since

1.1.0

See also

log2
ln

inline fun <T : Number> Iterable<T>.log2(): Iterable<Double>

Computes the binary logarithm (base 2) of the value Iterable.

Example:

listOf(2, 4, 8, 16).log2() // [1.0, 2.0, 3.0, 4.0]

Since

1.1.0

See also

log2
ln