Trait malachite_base::num::arithmetic::traits::WrappingSquareAssign
source · [−]pub trait WrappingSquareAssign {
fn wrapping_square_assign(&mut self);
}
Expand description
Squares a number in place, wrapping around at the boundary of the type.
Required Methods
fn wrapping_square_assign(&mut self)
Implementations on Foreign Types
sourceimpl WrappingSquareAssign for u8
impl WrappingSquareAssign for u8
sourcefn wrapping_square_assign(&mut self)
fn wrapping_square_assign(&mut self)
Squares a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv x^2 \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingSquareAssign for u16
impl WrappingSquareAssign for u16
sourcefn wrapping_square_assign(&mut self)
fn wrapping_square_assign(&mut self)
Squares a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv x^2 \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingSquareAssign for u32
impl WrappingSquareAssign for u32
sourcefn wrapping_square_assign(&mut self)
fn wrapping_square_assign(&mut self)
Squares a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv x^2 \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingSquareAssign for u64
impl WrappingSquareAssign for u64
sourcefn wrapping_square_assign(&mut self)
fn wrapping_square_assign(&mut self)
Squares a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv x^2 \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingSquareAssign for u128
impl WrappingSquareAssign for u128
sourcefn wrapping_square_assign(&mut self)
fn wrapping_square_assign(&mut self)
Squares a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv x^2 \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingSquareAssign for usize
impl WrappingSquareAssign for usize
sourcefn wrapping_square_assign(&mut self)
fn wrapping_square_assign(&mut self)
Squares a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv x^2 \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingSquareAssign for i8
impl WrappingSquareAssign for i8
sourcefn wrapping_square_assign(&mut self)
fn wrapping_square_assign(&mut self)
Squares a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv x^2 \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingSquareAssign for i16
impl WrappingSquareAssign for i16
sourcefn wrapping_square_assign(&mut self)
fn wrapping_square_assign(&mut self)
Squares a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv x^2 \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingSquareAssign for i32
impl WrappingSquareAssign for i32
sourcefn wrapping_square_assign(&mut self)
fn wrapping_square_assign(&mut self)
Squares a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv x^2 \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingSquareAssign for i64
impl WrappingSquareAssign for i64
sourcefn wrapping_square_assign(&mut self)
fn wrapping_square_assign(&mut self)
Squares a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv x^2 \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingSquareAssign for i128
impl WrappingSquareAssign for i128
sourcefn wrapping_square_assign(&mut self)
fn wrapping_square_assign(&mut self)
Squares a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv x^2 \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingSquareAssign for isize
impl WrappingSquareAssign for isize
sourcefn wrapping_square_assign(&mut self)
fn wrapping_square_assign(&mut self)
Squares a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv x^2 \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.