Trait malachite_base::num::arithmetic::traits::WrappingAddMul

source ·
pub trait WrappingAddMul<Y = Self, Z = Self> {
    type Output;

    // Required method
    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§

source

fn wrapping_add_mul(self, y: Y, z: Z) -> Self::Output

Implementations on Foreign Types§

source§

impl WrappingAddMul for i8

source§

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

source§

impl WrappingAddMul for i16

source§

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

source§

impl WrappingAddMul for i32

source§

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

source§

impl WrappingAddMul for i64

source§

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

source§

impl WrappingAddMul for i128

source§

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

source§

impl WrappingAddMul for isize

source§

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.

§

type Output = isize

source§

impl WrappingAddMul for u8

source§

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

source§

impl WrappingAddMul for u16

source§

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

source§

impl WrappingAddMul for u32

source§

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

source§

impl WrappingAddMul for u64

source§

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

source§

impl WrappingAddMul for u128

source§

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

source§

impl WrappingAddMul for usize

source§

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

Implementors§