Skip to main content

Coefficients

Trait Coefficients 

Source
pub unsafe trait Coefficients {
    // Required method
    fn a_b_c_discriminant(
        self,
    ) -> (impl AsRef<[u8]>, (Choice, impl AsRef<[u8]>), impl AsRef<[u8]>, impl AsRef<[u8]>);
}
Expand description

A primitive positive definite binary quadratic form of negative odd discriminant (not necessarily fundamental) with a, b, c coefficients.

§Safety

Implementations MUST return well-defined coefficients for a primitive reduced positive definite binary quadratic form of a negative odd discriminant (the one whose value is yielded). It is undefined behavior to not do so.

Required Methods§

Source

fn a_b_c_discriminant( self, ) -> (impl AsRef<[u8]>, (Choice, impl AsRef<[u8]>), impl AsRef<[u8]>, impl AsRef<[u8]>)

Fetch the a, b, c coefficients of the single reduced form equivalent to this form and the absolute value of its negative discriminant.

The coefficients and absolute value of the discriminant are little-endian encoded. b is represented by a sign bit, if b is positive (greater than or equal to zero), and the encoding of its absolute value. Values MAY have trailing zeroes.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§