#include <fft_roots.hpp>
Definition at line 46 of file fft_roots.hpp.
static nat max_order | ( | nat | b | ) | [inline, static] |
Definition at line 50 of file fft_roots.hpp.
Referenced by primitive_root_helper< modular< modulus< nat, V >, modular_fixed< nat, 0x0c0000001 > > >::op(), and mmx::primitive_root_max_order().
Definition at line 53 of file fft_roots.hpp.
References mmx::C, mmx::exp(), promote(), mmx::set_pi(), and mmx::times_i().
Referenced by mmx::primitive_root().
00053 { 00054 if (n == 1 || i == 0) return promote (1, fm); 00055 else if (n == 2) return promote (-1, fm); 00056 else { 00057 C z= promote (1, fm); 00058 set_pi (z); 00059 z= times_i (z); 00060 z= (promote ((int) (i+i), z) / promote ((int) n, z)) * z; 00061 return exp (z); 00062 //Real_type(C) angle= (2 * i * Pi(Real_type(C))) / n; 00063 //return gaussian (cos (angle), sin (angle)); 00064 } 00065 }