Hi,
I'm trying to set r=32 (I want to have arithmetic over 32-bit integers), but doing so runs into a division by zero error on decryption:
$ gdb --args ./Test_General_x R=1 k=10 p=2 r=32 d=1
[...]
Program received signal SIGABRT, Aborted.
0x00007ffff6db3425 in __GI_raise (sig=) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007ffff6db3425 in __GI_raise (sig=) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007ffff6db6b8b in __GI_abort () at abort.c:91
#2 0x000000000050f39e in _ntl_abort ()
#3 0x00000000004bcf6a in _ntl_gsmod ()
#4 0x000000000040a72d in rem (b=0, a=...) at /home/stephentu/ntl-6.0.0-bin/include/NTL/ZZ.h:536
#5 operator% (b=0, a=...) at /home/stephentu/ntl-6.0.0-bin/include/NTL/ZZ.h:562
#6 PolyRed (out=..., in=..., q=0, abs=true) at NumbTh.cpp:295
#7 0x000000000042f258 in PolyRed (abs=true, q=0, F=...) at NumbTh.h:136
#8 FHESecKey::Decrypt (this=0x7fffffffe050, plaintxt=..., ciphertxt=..., f=...) at FHE.cpp:641
#9 0x000000000042f3a5 in FHESecKey::Decrypt (this=, plaintxt=..., ciphertxt=...) at FHE.cpp:591
#10 0x0000000000443e7a in genericDecrypt (array=..., sKey=..., ctxt=..., this=0x7dcda0) at EncryptedArray.h:293
#11 EncryptedArrayDerived<PA_zz_p>::decrypt (this=0x7dcda0, ctxt=..., sKey=..., ptxt=...) at EncryptedArray.h:226
#12 0x0000000000405d78 in decrypt (ptxt=..., sKey=..., ctxt=..., this=0x7fffffffdb70) at EncryptedArray.h:387
#13 TestIt (R=R@entry=1, p=p@entry=2, r=r@entry=32, d=d@entry=1, c=c@entry=2, k=k@entry=10, w=w@entry=64, L=L@entry=4, m=3133) at Test_General.cpp:163
#14 0x00000000004036d9 in main (argc=, argv=) at Test_General.cpp:233
I'm not sure if this is a bug in the library, or just an error in the parameter selection. Any hints?