From: Aina Niemetz Date: Fri, 19 Mar 2021 17:16:56 +0000 (-0700) Subject: FP: Use setBit instead of bv or in conversion from Real. (#6177) X-Git-Tag: cvc5-1.0.0~2054 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=95f5be640fd362098a54e222d56d49144fe0efbe;p=cvc5.git FP: Use setBit instead of bv or in conversion from Real. (#6177) This is a minor optimization that goes into effect as soon as #6176 goes in. --- diff --git a/src/util/floatingpoint.cpp b/src/util/floatingpoint.cpp index fc7a8a991..42f411ab2 100644 --- a/src/util/floatingpoint.cpp +++ b/src/util/floatingpoint.cpp @@ -254,7 +254,7 @@ FloatingPoint::FloatingPoint(const FloatingPointSize& size, if (mid <= rabs) { - sig = sig | one; + sig = sig.setBit(0, true); workingSig = mid; } @@ -268,7 +268,7 @@ FloatingPoint::FloatingPoint(const FloatingPointSize& size, if (!remainder.isZero()) { - sig = sig | one; + sig = sig.setBit(0, true); } // Build an exact float