Skip to main content

MulAddMul

Trait MulAddMul 

Source
pub trait MulAddMul<Y = Self, Z = Self, W = Self> {
    type Output;

    // Required method
    fn mul_add_mul(self, y: Y, z: Z, w: W) -> Self::Output;
}
Expand description

Adds the products of two pairs of numbers.

Required Associated Types§

Required Methods§

Source

fn mul_add_mul(self, y: Y, z: Z, w: W) -> Self::Output

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl MulAddMul for i8

Source§

fn mul_add_mul(self, y: i8, z: i8, w: i8) -> i8

Adds the products of two pairs of numbers.

$f(x, y, z, w) = xy + zw$.

Both products and their sum wrap on overflow, as they do for add_mul.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = i8

Source§

impl MulAddMul for i16

Source§

fn mul_add_mul(self, y: i16, z: i16, w: i16) -> i16

Adds the products of two pairs of numbers.

$f(x, y, z, w) = xy + zw$.

Both products and their sum wrap on overflow, as they do for add_mul.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = i16

Source§

impl MulAddMul for i32

Source§

fn mul_add_mul(self, y: i32, z: i32, w: i32) -> i32

Adds the products of two pairs of numbers.

$f(x, y, z, w) = xy + zw$.

Both products and their sum wrap on overflow, as they do for add_mul.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = i32

Source§

impl MulAddMul for i64

Source§

fn mul_add_mul(self, y: i64, z: i64, w: i64) -> i64

Adds the products of two pairs of numbers.

$f(x, y, z, w) = xy + zw$.

Both products and their sum wrap on overflow, as they do for add_mul.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = i64

Source§

impl MulAddMul for i128

Source§

fn mul_add_mul(self, y: i128, z: i128, w: i128) -> i128

Adds the products of two pairs of numbers.

$f(x, y, z, w) = xy + zw$.

Both products and their sum wrap on overflow, as they do for add_mul.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = i128

Source§

impl MulAddMul for isize

Source§

fn mul_add_mul(self, y: isize, z: isize, w: isize) -> isize

Adds the products of two pairs of numbers.

$f(x, y, z, w) = xy + zw$.

Both products and their sum wrap on overflow, as they do for add_mul.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = isize

Source§

impl MulAddMul for u8

Source§

fn mul_add_mul(self, y: u8, z: u8, w: u8) -> u8

Adds the products of two pairs of numbers.

$f(x, y, z, w) = xy + zw$.

Both products and their sum wrap on overflow, as they do for add_mul.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = u8

Source§

impl MulAddMul for u16

Source§

fn mul_add_mul(self, y: u16, z: u16, w: u16) -> u16

Adds the products of two pairs of numbers.

$f(x, y, z, w) = xy + zw$.

Both products and their sum wrap on overflow, as they do for add_mul.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = u16

Source§

impl MulAddMul for u32

Source§

fn mul_add_mul(self, y: u32, z: u32, w: u32) -> u32

Adds the products of two pairs of numbers.

$f(x, y, z, w) = xy + zw$.

Both products and their sum wrap on overflow, as they do for add_mul.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = u32

Source§

impl MulAddMul for u64

Source§

fn mul_add_mul(self, y: u64, z: u64, w: u64) -> u64

Adds the products of two pairs of numbers.

$f(x, y, z, w) = xy + zw$.

Both products and their sum wrap on overflow, as they do for add_mul.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = u64

Source§

impl MulAddMul for u128

Source§

fn mul_add_mul(self, y: u128, z: u128, w: u128) -> u128

Adds the products of two pairs of numbers.

$f(x, y, z, w) = xy + zw$.

Both products and their sum wrap on overflow, as they do for add_mul.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = u128

Source§

impl MulAddMul for usize

Source§

fn mul_add_mul(self, y: usize, z: usize, w: usize) -> usize

Adds the products of two pairs of numbers.

$f(x, y, z, w) = xy + zw$.

Both products and their sum wrap on overflow, as they do for add_mul.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = usize

Implementors§