Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

msb

Calculates the most significant bit position.

Arguments

  • whole - The value to analyze (0 to 2^64)

Returns

A tuple of (bit_position, power_of_2) where:

  • bit_position is the index of the MSB (0-64)
  • power_of_2 is 2^bit_position

Fully qualified path: cairo_fp::f128::math::lut::msb

fn msb(whole: u128) -> (u128, u128)