Trait IsSquare Copy item path Source pub trait IsSquare {
// Required method
fn is_square (&self) -> bool ;
}Expand description A trait for testing whether a number is a square.
This trait is dyn compatible .
In older versions of Rust, dyn compatibility was called "object safety".
Determines whether an integer is a perfect square.
$f(x) = (\exists b \in \Z : b^2 = x)$.
§ Worst-case complexity
Constant time and additional memory.
§ Examples
See here .
Determines whether an integer is a perfect square.
$f(x) = (\exists b \in \Z : b^2 = x)$.
§ Worst-case complexity
Constant time and additional memory.
§ Examples
See here .
Determines whether an integer is a perfect square.
$f(x) = (\exists b \in \Z : b^2 = x)$.
§ Worst-case complexity
Constant time and additional memory.
§ Examples
See here .
Determines whether an integer is a perfect square.
$f(x) = (\exists b \in \Z : b^2 = x)$.
§ Worst-case complexity
Constant time and additional memory.
§ Examples
See here .
Determines whether an integer is a perfect square.
$f(x) = (\exists b \in \Z : b^2 = x)$.
§ Worst-case complexity
Constant time and additional memory.
§ Examples
See here .
Determines whether an integer is a perfect square.
$f(x) = (\exists b \in \Z : b^2 = x)$.
§ Worst-case complexity
Constant time and additional memory.
§ Examples
See here .
Determines whether an integer is a perfect square.
$f(x) = (\exists b \in \Z : b^2 = x)$.
§ Worst-case complexity
Constant time and additional memory.
§ Examples
See here .
Determines whether an integer is a perfect square.
$f(x) = (\exists b \in \Z : b^2 = x)$.
§ Worst-case complexity
Constant time and additional memory.
§ Examples
See here .
Determines whether an integer is a perfect square.
$f(x) = (\exists b \in \Z : b^2 = x)$.
§ Worst-case complexity
Constant time and additional memory.
§ Examples
See here .
Determines whether an integer is a perfect square.
$f(x) = (\exists b \in \Z : b^2 = x)$.
§ Worst-case complexity
Constant time and additional memory.
§ Examples
See here .
Determines whether an integer is a perfect square.
$f(x) = (\exists b \in \Z : b^2 = x)$.
§ Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits(): the
quadratic-residue prefilters are constant-time and reject most nonsquares, but surviving
candidates pay one $O(n)$ 128-bit square root.
§ Examples
See here .
Determines whether an integer is a perfect square.
$f(x) = (\exists b \in \Z : b^2 = x)$.
§ Worst-case complexity
Constant time and additional memory.
§ Examples
See here .