Skip to content

Commit 4d8159c

Browse files
committed
C++: Disable rounding.
1 parent 6dd45b3 commit 4d8159c

File tree

1 file changed

+1
-10
lines changed
  • cpp/ql/lib/experimental/semmle/code/cpp/semantic/analysis

1 file changed

+1
-10
lines changed

cpp/ql/lib/experimental/semmle/code/cpp/semantic/analysis/FloatDelta.qll

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,5 @@ module FloatDelta implements DeltaSig {
1616
Delta fromInt(int n) { result = n }
1717

1818
bindingset[f]
19-
Delta fromFloat(float f) {
20-
result =
21-
min(float diff, float res |
22-
diff = (res - f) and res = f.ceil()
23-
or
24-
diff = (f - res) and res = f.floor()
25-
|
26-
res order by diff
27-
)
28-
}
19+
Delta fromFloat(float f) { result = f }
2920
}

0 commit comments

Comments
 (0)