|
algebramix_doc 0.3
|
#include <fft_roots.hpp>
Definition at line 114 of file fft_roots.hpp.
Definition at line 115 of file fft_roots.hpp.
| static nat max_order | ( | nat | b | ) | [inline, static] |
Definition at line 118 of file fft_roots.hpp.
{
I m, p= * C::get_modulus ();
return primitive_root_max_order_int (b, p, m);
}
| static C op | ( | nat | n, |
| nat | i | ||
| ) | [inline, static] |
Definition at line 124 of file fft_roots.hpp.
{
nat b, k;
if (n == next_power_of_two (n)) b = 2;
else if (n == next_power_of_three (n)) b = 3;
else ERROR ("only radices 2 and 3 are implemented");
I m, p= * C::get_modulus ();
C v= primitive_root_max_int (b, p, k, m);
VERIFY (n <= k, "maximal order exceeded");
// v is now a primitive root of maximal order k
return binpow (v, i * (k / n));
}