From fd75600edbe2369a699d591dff80aa47fcdfdadd Mon Sep 17 00:00:00 2001 From: dineshkumar2509 <54076851+dineshkumar2509@users.noreply.github.com> Date: Thu, 1 Oct 2020 17:58:39 +0530 Subject: [PATCH] Update 64bit-fftmod.py --- Python3/Polynomials/64bit-fftmod.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Python3/Polynomials/64bit-fftmod.py b/Python3/Polynomials/64bit-fftmod.py index 1396a16..e512ad5 100644 --- a/Python3/Polynomials/64bit-fftmod.py +++ b/Python3/Polynomials/64bit-fftmod.py @@ -19,7 +19,7 @@ def pack(pack, shamt): npack += [pack[-1]] pack, size, shamt = npack, (size + 1) >> 1, shamt << 1 return pack[0] - +#for unpacking u can use the python inbuilt function t do it def unpack(M, size, shamt): s, sizes = size, [] while s > 1: @@ -38,4 +38,4 @@ def poly_mul(f, g, mod = 1000000007): shift = ((mod - 1) ** 2 * size).bit_length() rsize = len(f) + len(g) - 1 h = unpack(pack(f, shift) * pack(g, shift), rsize, shift * (1 << ilog2(rsize - 1))) - return [int(x % mod) for x in h] \ No newline at end of file + return [int(x % mod) for x in h]