pub trait LcmAssign<RHS = Self> {
    fn lcm_assign(&mut self, other: RHS);
}
Expand description

Replaces a number with the LCM (least common multiple) of it and another number.

Required Methods

Implementations on Foreign Types

Replaces a number with the LCM (least common multiple) of it and another number.

$$ x \gets \operatorname{lcm}(x, y). $$

Worst-case complexity

$T(n) = O(n^2)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is max(self.significant_bits(), other.significant_bits()).

Panics

Panics if the result is too large to be represented.

Examples

See here.

Replaces a number with the LCM (least common multiple) of it and another number.

$$ x \gets \operatorname{lcm}(x, y). $$

Worst-case complexity

$T(n) = O(n^2)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is max(self.significant_bits(), other.significant_bits()).

Panics

Panics if the result is too large to be represented.

Examples

See here.

Replaces a number with the LCM (least common multiple) of it and another number.

$$ x \gets \operatorname{lcm}(x, y). $$

Worst-case complexity

$T(n) = O(n^2)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is max(self.significant_bits(), other.significant_bits()).

Panics

Panics if the result is too large to be represented.

Examples

See here.

Replaces a number with the LCM (least common multiple) of it and another number.

$$ x \gets \operatorname{lcm}(x, y). $$

Worst-case complexity

$T(n) = O(n^2)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is max(self.significant_bits(), other.significant_bits()).

Panics

Panics if the result is too large to be represented.

Examples

See here.

Replaces a number with the LCM (least common multiple) of it and another number.

$$ x \gets \operatorname{lcm}(x, y). $$

Worst-case complexity

$T(n) = O(n^2)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is max(self.significant_bits(), other.significant_bits()).

Panics

Panics if the result is too large to be represented.

Examples

See here.

Replaces a number with the LCM (least common multiple) of it and another number.

$$ x \gets \operatorname{lcm}(x, y). $$

Worst-case complexity

$T(n) = O(n^2)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is max(self.significant_bits(), other.significant_bits()).

Panics

Panics if the result is too large to be represented.

Examples

See here.

Implementors