From 95f5be640fd362098a54e222d56d49144fe0efbe Mon Sep 17 00:00:00 2001 From: Aina Niemetz Date: Fri, 19 Mar 2021 10:16:56 -0700 Subject: [PATCH] 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. --- src/util/floatingpoint.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.30.2