pub struct F32 {
pub full: u64,
pub compact: u32,
}
Expand description
A type implementing maths in GF(232)
Natural storage class (u8, u16, u32, etc.) for storing
elements of the field. Read more
The next largest natural storage class, eg if E is u8, then EE
should be U16. Used for: Read more
Size of the field in bits, eg GF(28) → 8
High bit of field polynomial, eg GF(28) → 0x100
Mask for selecting all bits of field value,
eg GF(28) → 0xff Read more
High bit of field values, eg GF(28) → 0x80
The field polynomial with (implicit) high bit stripped off.
Field polynomial in full, with high poly bit set
fn add(&self, a: Self::E, b: Self::E) -> Self::E
Addition in Galois Fields GF(2x) is simply XOR
fn sub(&self, a: Self::E, b: Self::E) -> Self::E
Subtraction is the same as addition in GF(2x)
fn mul(&self, a: Self::E, b: Self::E) -> Self::E
Polynomial multiplication modulo the field polynomial
fn div(&self, a: Self::E, b: Self::E) -> Self::E
Division modulo to the field polynomial (default
implementation calculated as a・b-1 Read more
fn inv(&self, a: Self::E) -> Self::E
Calculate polynomial a・b-1 modulo the field
polynomial (using Extended Euclidean method) Read more
fn pow(&self, a: Self::E, b: Self::EE) -> Self::E
Access Self::HIGH_BIT as a method
Access Self::ORDER as a method
Access Self::FIELD_MASK as a method
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.