¡@

Home 

c++ Programming Glossary: modmul

Fast bignum square computation

http://stackoverflow.com/questions/18465326/fast-bignum-square-computation

need of modular arithmetics on unsigned integers modpow modmul modadd modsub i use DWORD 32bit unsigned integer numbers NTT.. yy xx n init NTT for n convolution for i 0 i n i yy i modmul yy i yy i ntt.p INTT ntt.INTT xx yy suma q 0 for i 0 j 0 i n..

modular arithmetics and NTT (finite field DFT) optimizations

http://stackoverflow.com/questions/18577076/modular-arithmetics-and-ntt-finite-field-dft-optimizations

modadd DWORD a DWORD b DWORD modsub DWORD a DWORD b DWORD modmul DWORD a DWORD b DWORD modpow DWORD a DWORD b void fourier_NTT.. n 0 init n NTT_fast dst src N iW for DWORD i 0 i N i dst i modmul dst i rN INTT_slow dst src N W bool fourier_NTT init DWORD.. if n 1 if n 1 dst 0 src 0 return DWORD i j a0 a1 n2 n 1 w2 modmul w w reorder even odd for i 0 j 0 i n2 i j 2 dst i src j for..