FP: Use setBit instead of bv or in conversion from Real. (#6177)
authorAina Niemetz <aina.niemetz@gmail.com>
Fri, 19 Mar 2021 17:16:56 +0000 (10:16 -0700)
committerGitHub <noreply@github.com>
Fri, 19 Mar 2021 17:16:56 +0000 (17:16 +0000)
This is a minor optimization that goes into effect as soon as #6176 goes
in.

src/util/floatingpoint.cpp

index fc7a8a99161458adff13ba652e8101e5469308e3..42f411ab266c807e494cc02aec3a9445038c77cf 100644 (file)
@@ -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