Merge pull request #12709 from MathiasVP/disable-rounding-2

C++: Disable floating point rounding in range analysis
This commit is contained in:
Mathias Vorreiter Pedersen
2023-03-30 10:05:47 +01:00
committed by GitHub
3 changed files with 5 additions and 14 deletions

View File

@@ -16,14 +16,5 @@ module FloatDelta implements DeltaSig {
Delta fromInt(int n) { result = n }
bindingset[f]
Delta fromFloat(float f) {
result =
min(float diff, float res |
diff = (res - f) and res = f.ceil()
or
diff = (f - res) and res = f.floor()
|
res order by diff
)
}
Delta fromFloat(float f) { result = f }
}