pub trait PowerOf2<POW> {
// Required method
fn power_of_2(pow: POW) -> Self;
}
Expand description
Raises 2 to an integer power.
$f(k) = 2^k$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if the power is smaller than Self::MIN_EXPONENT
or greater than
Self::MAX_EXPONENT
.
§Examples
See here.
Raises 2 to an integer power.
$f(k) = 2^k$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if the power is smaller than Self::MIN_EXPONENT
or greater than
Self::MAX_EXPONENT
.
§Examples
See here.
Raises 2 to an integer power.
$f(k) = 2^k$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if the result is not representable.
§Examples
See here.
Raises 2 to an integer power.
$f(k) = 2^k$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if the result is not representable.
§Examples
See here.
Raises 2 to an integer power.
$f(k) = 2^k$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if the result is not representable.
§Examples
See here.
Raises 2 to an integer power.
$f(k) = 2^k$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if the result is not representable.
§Examples
See here.
Raises 2 to an integer power.
$f(k) = 2^k$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if the result is not representable.
§Examples
See here.
Raises 2 to an integer power.
$f(k) = 2^k$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if the result is not representable.
§Examples
See here.
Raises 2 to an integer power.
$f(k) = 2^k$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if the result is not representable.
§Examples
See here.
Raises 2 to an integer power.
$f(k) = 2^k$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if the result is not representable.
§Examples
See here.
Raises 2 to an integer power.
$f(k) = 2^k$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if the result is not representable.
§Examples
See here.
Raises 2 to an integer power.
$f(k) = 2^k$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if the result is not representable.
§Examples
See here.
Raises 2 to an integer power.
$f(k) = 2^k$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if the result is not representable.
§Examples
See here.
Raises 2 to an integer power.
$f(k) = 2^k$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if the result is not representable.
§Examples
See here.