Hi @trandus,
I want to add more detail to what @iquah wrote. We have an example of large-precision comparison (sign function) at openfhe-development/eval-sign.cpp at v1.0.1 · openfheorg/openfhe-development · GitHub Under the hood, it uses the algorithm proposed in Large-Precision Homomorphic Sign Evaluation using FHEW/TFHE Bootstrapping.
Also I suggest reading a related topic: Optimization of Homomorphic Comparison Algorithm on RNS-CKKS Scheme