Fix precision bug (Jon)

This commit is contained in:
Peter Rugg
2019-03-22 00:06:54 +00:00
parent 3d9c6cc2ce
commit 34c9bea6d6

View File

@@ -449,7 +449,7 @@ function Tuple2#(CapFat, Bool) setBoundsFat(CapFat cap, Address lengthFull);
// We need to round up Exp if the length is within 2 of the maximum and if it will increase.
// The lomask for checking for potential overflow should mask all but the bottom bit of the mantissa.
lmaskLo = lmask>>fromInteger(shiftAmount);
lmaskLo = lmask>>fromInteger(shiftAmount+1);
Bool lengthMax = (len&(~lmaskLo))==(lmask&(~lmaskLo));
if(lengthMax && intExp && (lostSignificantLen || lostSignificantBase)) begin
e = e+1;