# Is there an implementation of Integer Comparison?

**URL:** <https://openfhe.discourse.group/t/is-there-an-implementation-of-integer-comparison/275>\
**Category:** Library Questions\
**Created:** [December 7, 2022, 12:00pm UTC](https://openfhe.discourse.group/t/is-there-an-implementation-of-integer-comparison/275 "2022-12-07T12:00:02Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![ypolyakov](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/ypolyakov/32/47_2.png) [@ypolyakov](https://openfhe.discourse.group/u/ypolyakov)\
**Post date:** [December 8, 2022, 1:05am UTC](https://openfhe.discourse.group/t/is-there-an-implementation-of-integer-comparison/275/4 "2022-12-08T01:05:36Z")

</div>

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](https://github.com/openfheorg/openfhe-development/blob/v1.0.1/src/binfhe/examples/eval-sign.cpp) Under the hood, it uses the algorithm proposed in [Large-Precision Homomorphic Sign Evaluation using FHEW/TFHE Bootstrapping](https://eprint.iacr.org/2021/1337).

Also I suggest reading a related topic: [Optimization of Homomorphic Comparison Algorithm on RNS-CKKS Scheme](https://openfhe.discourse.group/t/optimization-of-homomorphic-comparison-algorithm-on-rns-ckks-scheme/256)

---

_[View the full topic](https://openfhe.discourse.group/t/is-there-an-implementation-of-integer-comparison/275)._
