Q1) I am implementing comparison with help of polynomial approximations. If the degree of polynomial is 9 or 7, the M. depth will be 4 and if the degree of polynomial is 3,5, the M. depth will be 3. How EvalPoly function does multiplication and evaluation?
Q2) In CKKS scheme based comparison, values should be in range of [-1,1] for polynomial approximation. How to handle if values are not in these interval (even after manual scaling) ? Decryption is not happening in that case due to high error.
You can check this file, which gives multiplicative depth for a given degree. In short, linear evaluation is used for low-degree polynomials (up to degree 5), and for higher degrees, a modified version of the Paterson-Stockmeyer algorithm is used (you can check 2018/1043).
You need to provide bounds [a, b] for the interpolation, as demonstrated in the function evaluation example to get “correct” results. If the value falls outside this interval, the result will be “incorrect”.