pub trait FloorLogBase2 {
type Output;
// Required method
fn floor_log_base_2(self) -> Self::Output;
}
Expand description
Calculates the floor of the base-2 logarithm of a number.
Returns the floor of the base-2 logarithm of a positive float.
$f(x) = \lfloor\log_2 x\rfloor$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self
is infinite, NaN
, or less than or equal to zero.
§Examples
See here.
Returns the floor of the base-2 logarithm of a positive float.
$f(x) = \lfloor\log_2 x\rfloor$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self
is infinite, NaN
, or less than or equal to zero.
§Examples
See here.
Returns the floor of the base-2 logarithm of a positive integer.
$f(x) = \lfloor\log_2 x\rfloor$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self
is 0.
§Examples
See here.
Returns the floor of the base-2 logarithm of a positive integer.
$f(x) = \lfloor\log_2 x\rfloor$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self
is 0.
§Examples
See here.
Returns the floor of the base-2 logarithm of a positive integer.
$f(x) = \lfloor\log_2 x\rfloor$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self
is 0.
§Examples
See here.
Returns the floor of the base-2 logarithm of a positive integer.
$f(x) = \lfloor\log_2 x\rfloor$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self
is 0.
§Examples
See here.
Returns the floor of the base-2 logarithm of a positive integer.
$f(x) = \lfloor\log_2 x\rfloor$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self
is 0.
§Examples
See here.
Returns the floor of the base-2 logarithm of a positive integer.
$f(x) = \lfloor\log_2 x\rfloor$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self
is 0.
§Examples
See here.