EvalAdd does not add in some cases

Hi @lujoho

It looks you ran into another bug. The high-level story is that when you set scale mod size to 58, you end up adding 2^{58} * value to the ciphertext. As soon value hits 64, you get 2^{58} 2^6 = 2^{64}, which overflows for 64-bit numbers. I’ve added an issue for this: Adding a large scalar does not work in CKKS · Issue #393 · openfheorg/openfhe-development · GitHub

Please note that this scenario is not very practical for CKKS (this is why you ran into two bugs). One only needs a large scaling factor in scenarios with CKKS bootstrapping. When using CKKS bootstrapping, the message should be normalized to something like [-1,1]. Otherwise, the modular reduction approximation in CKKS bootstrapping will become inaccurate. See Questions on CKKS bootstrapping with some computations after bootstrapping - #6 by wupengfei for a more detailed discussion on this.

When one does not use CKKS bootstrapping, a much smaller scaling factor will be sufficient. So this issue is unlikely to come up.

With all that said, both are real bugs, and we will address in the next bugfix version (v1.0.4). Thank you for reporting these bugs.