OxL Reference

method f32.log2

The base-2 logarithm.

Example:

oxl✓ checked in CI
fn main() io {
  let x: f32 = 8.0
  print("{x.log2()}")
}
Output
3.0
pub(api) fn log2() -> f32

Complexity. O(1).

Since. 1.0.0-beta

Returns

f32

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/numbers.oxl:4378

See also