diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2018-11-21 08:59:51 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-21 08:59:51 -0600 |
commit | b3b1fffb390d19312227d7095fb404e9e0447d95 (patch) | |
tree | 7c3ba92c3439fd918a6120c9245f60a20a6ee333 /src/theory/fp | |
parent | 7a58c9853012e7ae5992d5062592d8a21738bd32 (diff) |
Fix type enumerator for FP (#2717)
Diffstat (limited to 'src/theory/fp')
-rw-r--r-- | src/theory/fp/type_enumerator.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/theory/fp/type_enumerator.h b/src/theory/fp/type_enumerator.h index 96a61f207..eeb1ac4f8 100644 --- a/src/theory/fp/type_enumerator.h +++ b/src/theory/fp/type_enumerator.h @@ -64,8 +64,12 @@ class FloatingPointEnumerator protected: FloatingPoint createFP(void) const { // Rotate the LSB into the sign so that NaN is the last value - const BitVector value = - d_state.logicalRightShift(1) | d_state.leftShift(d_state.getSize() - 1); + uint64_t vone = 1; + uint64_t vmax = d_state.getSize() - 1; + BitVector bva = + d_state.logicalRightShift(BitVector(d_state.getSize(), vone)); + BitVector bvb = d_state.leftShift(BitVector(d_state.getSize(), vmax)); + const BitVector value = (bva | bvb); return FloatingPoint(d_e, d_s, value); } |