Trait malachite_base::num::arithmetic::traits::OverflowingSquareAssign
source · [−]pub trait OverflowingSquareAssign {
fn overflowing_square_assign(&mut self) -> bool;
}
Expand description
Squares a number in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped number is assigned.
Required Methods
fn overflowing_square_assign(&mut self) -> bool
Implementations on Foreign Types
sourceimpl OverflowingSquareAssign for u8
impl OverflowingSquareAssign for u8
sourcefn overflowing_square_assign(&mut self) -> bool
fn overflowing_square_assign(&mut self) -> bool
Squares a number in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSquareAssign for u16
impl OverflowingSquareAssign for u16
sourcefn overflowing_square_assign(&mut self) -> bool
fn overflowing_square_assign(&mut self) -> bool
Squares a number in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSquareAssign for u32
impl OverflowingSquareAssign for u32
sourcefn overflowing_square_assign(&mut self) -> bool
fn overflowing_square_assign(&mut self) -> bool
Squares a number in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSquareAssign for u64
impl OverflowingSquareAssign for u64
sourcefn overflowing_square_assign(&mut self) -> bool
fn overflowing_square_assign(&mut self) -> bool
Squares a number in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSquareAssign for u128
impl OverflowingSquareAssign for u128
sourcefn overflowing_square_assign(&mut self) -> bool
fn overflowing_square_assign(&mut self) -> bool
Squares a number in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSquareAssign for usize
impl OverflowingSquareAssign for usize
sourcefn overflowing_square_assign(&mut self) -> bool
fn overflowing_square_assign(&mut self) -> bool
Squares a number in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSquareAssign for i8
impl OverflowingSquareAssign for i8
sourcefn overflowing_square_assign(&mut self) -> bool
fn overflowing_square_assign(&mut self) -> bool
Squares a number in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSquareAssign for i16
impl OverflowingSquareAssign for i16
sourcefn overflowing_square_assign(&mut self) -> bool
fn overflowing_square_assign(&mut self) -> bool
Squares a number in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSquareAssign for i32
impl OverflowingSquareAssign for i32
sourcefn overflowing_square_assign(&mut self) -> bool
fn overflowing_square_assign(&mut self) -> bool
Squares a number in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSquareAssign for i64
impl OverflowingSquareAssign for i64
sourcefn overflowing_square_assign(&mut self) -> bool
fn overflowing_square_assign(&mut self) -> bool
Squares a number in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSquareAssign for i128
impl OverflowingSquareAssign for i128
sourcefn overflowing_square_assign(&mut self) -> bool
fn overflowing_square_assign(&mut self) -> bool
Squares a number in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSquareAssign for isize
impl OverflowingSquareAssign for isize
sourcefn overflowing_square_assign(&mut self) -> bool
fn overflowing_square_assign(&mut self) -> bool
Squares a number in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.