Caustic v0.1.13 Caustic.FiniteField View Source
Module for the creation of finite field element. For the supported operations,
see Caustic.Field
.
Examples
# Represents 1 which is a member of finite field of order 5
iex> Caustic.FiniteField.make(1, 5)
{1, 5}
# Modulo addition 1 + 4 mod 5
iex> Caustic.Field.add({1, 5}, {4, 5})
{0, 5}
# Test for congruence 4 * 4 ≡ 1 (mod 5)
iex> Caustic.Field.mul({4, 5}, {4, 5}) |> Caustic.Field.eq?({1, 5})
true
Link to this section Summary
Link to this section Types
Link to this section Functions
Link to this function
make(num, prime)
View Source
make(integer(), integer()) :: finite_field_elem()