pub trait XMulYToZZ: Sized {
    fn x_mul_y_to_zz(x: Self, y: Self) -> (Self, Self);
}
Expand description

Multiplies two numbers, returning the product as a pair of Self values.

The more significant number always comes first.

Required Methods

Implementations on Foreign Types

Multiplies two numbers, returning the product as a pair of Self values.

The more significant value always comes first.

$$ f(x, y) = (z_1, z_0), $$ where $W$ is Self::WIDTH,

$x, y, z_1, z_0 < 2^W$, and $$ xy = 2^Wz_1 + z_0. $$

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to umul_ppmm from longlong.h, GMP 6.2.1, where (w1, w0) is returned.

Multiplies two numbers, returning the product as a pair of Self values.

The more significant value always comes first.

$$ f(x, y) = (z_1, z_0), $$ where $W$ is Self::WIDTH,

$x, y, z_1, z_0 < 2^W$, and $$ xy = 2^Wz_1 + z_0. $$

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to umul_ppmm from longlong.h, GMP 6.2.1, where (w1, w0) is returned.

Multiplies two numbers, returning the product as a pair of Self values.

The more significant value always comes first.

$$ f(x, y) = (z_1, z_0), $$ where $W$ is Self::WIDTH,

$x, y, z_1, z_0 < 2^W$, and $$ xy = 2^Wz_1 + z_0. $$

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to umul_ppmm from longlong.h, GMP 6.2.1, where (w1, w0) is returned.

Multiplies two numbers, returning the product as a pair of Self values.

The more significant value always comes first.

$$ f(x, y) = (z_1, z_0), $$ where $W$ is Self::WIDTH,

$x, y, z_1, z_0 < 2^W$, and $$ xy = 2^Wz_1 + z_0. $$

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to umul_ppmm from longlong.h, GMP 6.2.1, where (w1, w0) is returned.

Multiplies two numbers, returning the product as a pair of usize values.

The more significant value always comes first.

$$ f(x, y) = (z_1, z_0), $$ where $W$ is Self::WIDTH,

$x, y, z_1, z_0 < 2^W$, and $$ xy = 2^Wz_1 + z_0. $$

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to umul_ppmm from longlong.h, GMP 6.2.1, where (w1, w0) is returned.

Multiplies two numbers, returning the product as a pair of u128 values.

The more significant value always comes first.

$$ f(x, y) = (z_1, z_0), $$ where $W$ is Self::WIDTH,

$x, y, z_1, z_0 < 2^W$, and $$ xy = 2^Wz_1 + z_0. $$

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to umul_ppmm from longlong.h, GMP 6.2.1, where (w1, w0) is returned.

Implementors