Correctness measurement in TFHE-rs

Hi folks,

I am really enjoying looking at the details of those TFHE papers at the TFHE-rs implementation and matching each part of the theory to the library. While doing so, I have one question on the correctness, claimed in the library.

How is the correctness computed? For e.g., DEFAULT_PARAMETERS, how is 2^(-40) computed?

Does the TFHE-rs library follow the correctness measurement described in this paper? If this is right, Remark 4 seems to be the case for DEFAULT_PARAMETERS, then what is the plaintext modulus 2^pi * p?

What I know: the original CGGI paper computed the variance of the final error (Theorems 6.2&6.3) and then computed the correctness = erf(threshold/sqrt(2*var)), where threshold = 1/16 (page 54).

Hello sorry @H_Choe your question fell through the cracks.

The 2^-40 error probability indicates that for a well formed ciphertext there is 1 chance in 2^40 that a PBS will fail to evaluate the proper value for it

I think the plaintext modulus for the default parameters are 3 bits + a bit of padding with a maximum norm 2 of 3

hope this helps !