// output of ./demo/mod/modinfo-demo.cc: // Description: //% Demo of mod_init(): properties of (Z/mZ)* arg 1: 0 == m [Modulus, 0==>use all moduli from list] default=0 -------- start MOD_INIT(): m=4 -------- modulus= 4 == 0x4 modulus is cyclic modulus is composite == 2^2 bits(modulus)= 3 euler_phi(modulus)= 2 == 0x2 == 2 maxorder= 2 == 0x2 maxordelem= 3 == 0x3 order(2)= 0 max2pow= 1 (max FFT length = 2**1 == 2) 2\modulus, cannot divide by 2 (or 2**n) =--> no length 2**n inverse FFT ! root2pow(max2pow)=3 root2pow(-max2pow)=3 -------- end MOD_INIT(). -------- -------- start MOD_INIT(): m=17 -------- modulus= 17 == 0x11 modulus is cyclic modulus is prime bits(modulus)= 4.0874628 == 5 - 0.91253716 euler_phi(modulus)= 16 == 0x10 == 2^4 maxorder= 16 == 0x10 maxordelem= 3 == 0x3 order(2)= 8 == 2^3 order(2^2)=2^2 order(2^3)=2^3 order(2^4)=2^1 max2pow= 4 (max FFT length = 2**4 == 16) root2pow(max2pow)=3 root2pow(-max2pow)=6 sqrt(-1) =: i = 13 -------- end MOD_INIT(). -------- -------- start MOD_INIT(): m=18 -------- modulus= 18 == 0x12 modulus is cyclic modulus is composite == 2 * 3^2 bits(modulus)= 4.169925 == 5 - 0.830075 euler_phi(modulus)= 6 == 0x6 == 2 * 3 maxorder= 6 == 0x6 maxordelem= 5 == 0x5 order(2)= 0 max2pow= 1 (max FFT length = 2**1 == 2) 2\modulus, cannot divide by 2 (or 2**n) =--> no length 2**n inverse FFT ! root2pow(max2pow)=17 root2pow(-max2pow)=17 -------- end MOD_INIT(). -------- -------- start MOD_INIT(): m=31 -------- modulus= 31 == 0x1f modulus is cyclic modulus is prime bits(modulus)= 4.9541963 == 5 - 0.04580369 euler_phi(modulus)= 30 == 0x1e == 2 * 3 * 5 maxorder= 30 == 0x1e maxordelem= 3 == 0x3 order(2)= 5 == 5 max2pow= 1 (max FFT length = 2**1 == 2) root2pow(max2pow)=30 root2pow(-max2pow)=30 -------- end MOD_INIT(). -------- -------- start MOD_INIT(): m=32 -------- modulus= 32 == 0x20 modulus is NOT cyclic modulus is composite == 2^5 bits(modulus)= 6 euler_phi(modulus)= 16 == 0x10 == 2^4 maxorder= 8 == 0x8 maxordelem= 3 == 0x3 order(2)= 0 max2pow= 3 (max FFT length = 2**3 == 8) 2\modulus, cannot divide by 2 (or 2**n) =--> no length 2**n inverse FFT ! root2pow(max2pow)=3 root2pow(-max2pow)=11 sqrt(-1) =: i = 9 root2pow(1)=17 != -1 (!) -------- end MOD_INIT(). -------- -------- start MOD_INIT(): m=121 -------- modulus= 121 == 0x79 modulus is cyclic modulus is composite == 11^2 bits(modulus)= 6.9188632 == 7 - 0.081136763 euler_phi(modulus)= 110 == 0x6e == 2 * 5 * 11 maxorder= 110 == 0x6e maxordelem= 2 == 0x2 order(2)= 110 == 2 * 5 * 11 max2pow= 1 (max FFT length = 2**1 == 2) root2pow(max2pow)=120 root2pow(-max2pow)=120 -------- end MOD_INIT(). -------- -------- start MOD_INIT(): m=2047 -------- modulus= 2047 == 0x7ff modulus is NOT cyclic modulus is composite == 23 * 89 bits(modulus)= 10.999295 == 11 - 0.00070461298 euler_phi(modulus)= 1936 == 0x790 == 2^4 * 11^2 maxorder= 88 == 0x58 maxordelem= 3 == 0x3 order(2)= 11 == 11 max2pow= 3 (max FFT length = 2**3 == 8) root2pow(max2pow)=1105 root2pow(-max2pow)=967 sqrt(-1) =: i = 1013 root2pow(1)=622 != -1 (!) -------- end MOD_INIT(). -------- -------- start MOD_INIT(): m=65537 -------- modulus= 65537 == 0x10001 modulus is cyclic modulus is prime bits(modulus)= 16.000022 == 17 - 0.99997799 euler_phi(modulus)= 65536 == 0x10000 == 2^16 maxorder= 65536 == 0x10000 maxordelem= 3 == 0x3 order(2)= 32 == 2^5 order(2^2)=2^4 order(2^3)=2^5 order(2^4)=2^3 order(2^8)=2^2 order(2^16)=2^1 max2pow= 16 (max FFT length = 2**16 == 65536) root2pow(max2pow)=3 root2pow(-max2pow)=21846 sqrt(-1) =: i = 65281 -------- end MOD_INIT(). --------