Converts elements of GF(p^n) to exponential notation α^k
k = gf_to_exponential(F, a) k = gf_to_exponential(F, a, format)
An extension field GF(p^n), n > 1, created by gf_create_field.
Elements: a matrix with n columns of integers in 0 .. p-1, one element per row (constant term first).
"e" (default) to return exponents, or "c" to return strings.
Column vector with one entry per row of a.
With "e": the integer k such that the element is α^k, in 0 .. p^n - 2, or -1 for the zero element.
With "c": the strings "x^k", where x stands for α, or "0" for the zero element.
gf_to_exponential finds the discrete logarithm of each element to the base α, the root of the field's primitive polynomial. This turns multiplication into addition of exponents modulo p^n - 1. gf_minimal_polynomial takes its element argument in this form.
The inverse conversion is a lookup in the element table: α^k is F(4)(k + 2, :). Only extension fields (n > 1) are supported.
| Version | Description |
| 2.0.0 | Refactoring of the function/toolbox. |