Trait malachite_base::num::arithmetic::traits::WrappingAddMul
source · [−]pub trait WrappingAddMul<Y = Self, Z = Self> {
type Output;
fn wrapping_add_mul(self, y: Y, z: Z) -> Self::Output;
}
Expand description
Adds a number and the product of two other numbers, wrapping around at the boundary of the type.
Required Associated Types
Required Methods
fn wrapping_add_mul(self, y: Y, z: Z) -> Self::Output
Implementations on Foreign Types
sourceimpl WrappingAddMul<u8, u8> for u8
impl WrappingAddMul<u8, u8> for u8
sourcefn wrapping_add_mul(self, y: u8, z: u8) -> u8
fn wrapping_add_mul(self, y: u8, z: u8) -> u8
Adds a number and the product of two other numbers, wrapping around at the boundary of the type.
$f(x, y, z) = w$, where $w \equiv x + yz \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
type Output = u8
sourceimpl WrappingAddMul<u16, u16> for u16
impl WrappingAddMul<u16, u16> for u16
sourcefn wrapping_add_mul(self, y: u16, z: u16) -> u16
fn wrapping_add_mul(self, y: u16, z: u16) -> u16
Adds a number and the product of two other numbers, wrapping around at the boundary of the type.
$f(x, y, z) = w$, where $w \equiv x + yz \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
type Output = u16
sourceimpl WrappingAddMul<u32, u32> for u32
impl WrappingAddMul<u32, u32> for u32
sourcefn wrapping_add_mul(self, y: u32, z: u32) -> u32
fn wrapping_add_mul(self, y: u32, z: u32) -> u32
Adds a number and the product of two other numbers, wrapping around at the boundary of the type.
$f(x, y, z) = w$, where $w \equiv x + yz \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
type Output = u32
sourceimpl WrappingAddMul<u64, u64> for u64
impl WrappingAddMul<u64, u64> for u64
sourcefn wrapping_add_mul(self, y: u64, z: u64) -> u64
fn wrapping_add_mul(self, y: u64, z: u64) -> u64
Adds a number and the product of two other numbers, wrapping around at the boundary of the type.
$f(x, y, z) = w$, where $w \equiv x + yz \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
type Output = u64
sourceimpl WrappingAddMul<u128, u128> for u128
impl WrappingAddMul<u128, u128> for u128
sourcefn wrapping_add_mul(self, y: u128, z: u128) -> u128
fn wrapping_add_mul(self, y: u128, z: u128) -> u128
Adds a number and the product of two other numbers, wrapping around at the boundary of the type.
$f(x, y, z) = w$, where $w \equiv x + yz \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
type Output = u128
sourceimpl WrappingAddMul<usize, usize> for usize
impl WrappingAddMul<usize, usize> for usize
sourcefn wrapping_add_mul(self, y: usize, z: usize) -> usize
fn wrapping_add_mul(self, y: usize, z: usize) -> usize
Adds a number and the product of two other numbers, wrapping around at the boundary of the type.
$f(x, y, z) = w$, where $w \equiv x + yz \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
type Output = usize
sourceimpl WrappingAddMul<i8, i8> for i8
impl WrappingAddMul<i8, i8> for i8
sourcefn wrapping_add_mul(self, y: i8, z: i8) -> i8
fn wrapping_add_mul(self, y: i8, z: i8) -> i8
Adds a number and the product of two other numbers, wrapping around at the boundary of the type.
$f(x, y, z) = w$, where $w \equiv x + yz \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
type Output = i8
sourceimpl WrappingAddMul<i16, i16> for i16
impl WrappingAddMul<i16, i16> for i16
sourcefn wrapping_add_mul(self, y: i16, z: i16) -> i16
fn wrapping_add_mul(self, y: i16, z: i16) -> i16
Adds a number and the product of two other numbers, wrapping around at the boundary of the type.
$f(x, y, z) = w$, where $w \equiv x + yz \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
type Output = i16
sourceimpl WrappingAddMul<i32, i32> for i32
impl WrappingAddMul<i32, i32> for i32
sourcefn wrapping_add_mul(self, y: i32, z: i32) -> i32
fn wrapping_add_mul(self, y: i32, z: i32) -> i32
Adds a number and the product of two other numbers, wrapping around at the boundary of the type.
$f(x, y, z) = w$, where $w \equiv x + yz \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
type Output = i32
sourceimpl WrappingAddMul<i64, i64> for i64
impl WrappingAddMul<i64, i64> for i64
sourcefn wrapping_add_mul(self, y: i64, z: i64) -> i64
fn wrapping_add_mul(self, y: i64, z: i64) -> i64
Adds a number and the product of two other numbers, wrapping around at the boundary of the type.
$f(x, y, z) = w$, where $w \equiv x + yz \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
type Output = i64
sourceimpl WrappingAddMul<i128, i128> for i128
impl WrappingAddMul<i128, i128> for i128
sourcefn wrapping_add_mul(self, y: i128, z: i128) -> i128
fn wrapping_add_mul(self, y: i128, z: i128) -> i128
Adds a number and the product of two other numbers, wrapping around at the boundary of the type.
$f(x, y, z) = w$, where $w \equiv x + yz \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
type Output = i128
sourceimpl WrappingAddMul<isize, isize> for isize
impl WrappingAddMul<isize, isize> for isize
sourcefn wrapping_add_mul(self, y: isize, z: isize) -> isize
fn wrapping_add_mul(self, y: isize, z: isize) -> isize
Adds a number and the product of two other numbers, wrapping around at the boundary of the type.
$f(x, y, z) = w$, where $w \equiv x + yz \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.