How to build a known polynomial (here aerobus::known_polynomials::allone) with coefficients in a finite field (here aerobus::zpz<2>) and get its value when evaluated at a value in this field (here 1).
#include <iostream>
#include "../src/aerobus.h"
using P = aerobus::known_polynomials::allone<8, GF2>;
int main() {
using value_at_1 = P::template value_at_t<GF2::template inject_constant_t<1>>;
constexpr int32_t x = value_at_1::template get<int32_t>();
std::cout << "expected = " << 1 << std::endl;
std::cout << "computed = " << x << std::endl;
return 0;
}
congruence classes of integers modulo p (32 bits)
Definition aerobus.h:1607