Fix the FOR loop count formula (#1222)

This commit is contained in:
Rangi
2023-11-07 17:43:46 -05:00
committed by GitHub
parent 5379e51094
commit 9fc088dcb0
4 changed files with 46 additions and 3 deletions

View File

@@ -0,0 +1,18 @@
FOR x, -2147483648, 1610612736, 1073741824
80000000 = -2147483648
c0000000 = -1073741824
00000000 = 0
40000000 = 1073741824
done 80000000 = -2147483648
FOR x, -2147483648, 1879048192, 1140850688
80000000 = -2147483648
c4000000 = -1006632960
08000000 = 134217728
4c000000 = 1275068416
done 90000000 = -1879048192
FOR x, 2147483647, -2147483648, -2147483648
7fffffff = 2147483647
ffffffff = -1
done 7fffffff = 2147483647
FOR x, -2147483648, -1, -2147483648
done 80000000 = -2147483648