Skip to content

Commit 210a0fd

Browse files
authored
Update SearchBasedFuzzer.ipynb
fix Branch Distances
1 parent c675e20 commit 210a0fd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

notebooks/SearchBasedFuzzer.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,9 +1217,9 @@
12171217
"| ------------- |:-------------:| -----:|\n",
12181218
"| a == b | abs(a - b) | 1 |\n",
12191219
"| a != b | 1 | abs(a - b) |\n",
1220-
"| a < b | b - a + 1 | a - b |\n",
1221-
"| a <= b | b - a | a - b + 1 |\n",
1222-
"| a > b | a - b + 1 | b - a |\n",
1220+
"| a < b | a - b + 1 | b - a |\n",
1221+
"| a <= b | a - b | b - a + 1 |\n",
1222+
"| a > b | b - a + 1 | a - b |\n",
12231223
"\n",
12241224
"\n",
12251225
"Note that several of the calculations add a constant `1`. The reason for this is quite simple: Suppose we want to have `a < b` evaluate to true, and let `a = 27` and `b = 27`. The condition is not true, but simply taking the difference would give us a result of `0`. To avoid this, we have to add a constant value. It is not important whether this value is `1` -- any positive constant works."

0 commit comments

Comments
 (0)