diff options
author | Aina Niemetz <aina.niemetz@gmail.com> | 2021-03-19 10:16:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-19 17:16:56 +0000 |
commit | 95f5be640fd362098a54e222d56d49144fe0efbe (patch) | |
tree | 39a3e5d754b4e78a9696c7f8c59337cc08f15ffa /src/util | |
parent | f5c1740fed59fc200e439fe1fcf230b0ed7081ac (diff) |
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.
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/floatingpoint.cpp | 4 |
1 files 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 |