For a primitive root, then, . It is precisely the cyclic, or modular, nature of primitive roots that forms the basis for the matrix factorizations which render the FFT so efficient. We relax the latter constraint as all integer arithmetic is generally fast nowadays. We need a sufficiently long modulus to accommodate our sequence values. As we know a priori , we can bound the peak output magnitude by .
Real data is accommodated by a post-convolution scaling factor , where q is the desired precision.
Instead, we use a composite modulus. The prime factorization of any composite is . Euler's totient function enumerates relative primes, e.g. , . If the modulus is a prime, then is a field and all the elements of are invertible . However, in theory we carry out the NTT modulo the Fermat primes of the composite's prime factorization.