Hello!
I’m still in the journey of understanding the implementation of CKKS. I start to dig in the encoding (ckkspackedencoding.cpp) and I have many doubts. At least the papers that I using do not answer this questions.

When creating a PlainText, is there when the modulis qi’s are “created”/Chosen? (The ones for the encryption)

After using FFTSpecialInv (line 272), a vector twice the size of the FFT output is created, and the first half is filled with the real part of the output and the second half with the imaginary. Why?

The last one, has something to do with the way that approximation error is then computed?

When we fill this vector, we do not allow negative values, by adding the max value possible, why?

I see that after this step, this vector is mapped into multiple towers (or limbs). This is a step for optimization purposes? For the encryption. (I recall that the CKKS encoding has no “RNS”).