-
Hi there, I tried to implement a comparison for integers using the BGV/BFV scheme. The equality circuit seems to work, but once I add two "comparisons" together, an overflow seems to happen and I can't get rid of it by Rescaling. Here's the code:
The output is:
I would expect that addition results in |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @kragall there is indeed a bug, the method In the meantime you can correct it by manually setting the metadata: |
Beta Was this translation helpful? Give feedback.
-
Oh, so it was a bug! Thanks for the workaround! |
Beta Was this translation helpful? Give feedback.
Hi @kragall there is indeed a bug, the method
eval.Add
doesn't set the scale of the output ciphertext correctly. I've opened an issue: #467In the meantime you can correct it by manually setting the metadata:
*add.MetaData = *cmps[0].MetaData