You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Thought I'd offer a more detailed analysis of the exponent bug reported by Ever on Discord. There's very serious issues with computing exponents in a fairly normal circumstance.
VB gives the expected values, but tB values make no sense at all. 3^2 = 8, 4^=16, 5^2 = 32?? Ever suggest parsing was reversed; but that doesn't explain it either; 5^-2 is 0.04, not 32.
To Reproduce
Dim fizz AsLongDim buzz AsLongDim i AsLong, j AsLongFor i = 0To5For j = 1To3
fizz = i: buzz = j
Debug.Print i & " ^ (" & j & " - 1) = " & fizz ^ (buzz - 1)
Next j
Next i
Expected behavior
Values should match VB6.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: Windows 10
twinBASIC compiler version 0.15.423
Additional context
Weird this bug has gone unnoticed until now.
The text was updated successfully, but these errors were encountered:
Describe the bug
Thought I'd offer a more detailed analysis of the exponent bug reported by Ever on Discord. There's very serious issues with computing exponents in a fairly normal circumstance.
0 ^ (1 - 1) = 1
0 ^ (2 - 1) = 0
0 ^ (3 - 1) = 0
1 ^ (1 - 1) = 1
1 ^ (2 - 1) = 1
1 ^ (3 - 1) = 1
2 ^ (1 - 1) = 1
2 ^ (2 - 1) = 2
2 ^ (3 - 1) = 4
3 ^ (1 - 1) = 1
3 ^ (2 - 1) = 3
3 ^ (3 - 1) = 9
4 ^ (1 - 1) = 1
4 ^ (2 - 1) = 4
4 ^ (3 - 1) = 16
5 ^ (1 - 1) = 1
5 ^ (2 - 1) = 5
5 ^ (3 - 1) = 25
0 ^ (1 - 1) = 1
0 ^ (2 - 1) = 1
0 ^ (3 - 1) = 1
1 ^ (1 - 1) = 0
1 ^ (2 - 1) = 1
1 ^ (3 - 1) = 2
2 ^ (1 - 1) = 0
2 ^ (2 - 1) = 1
2 ^ (3 - 1) = 4
3 ^ (1 - 1) = 0
3 ^ (2 - 1) = 1
3 ^ (3 - 1) = 8
4 ^ (1 - 1) = 0
4 ^ (2 - 1) = 1
4 ^ (3 - 1) = 16
5 ^ (1 - 1) = 0
5 ^ (2 - 1) = 1
5 ^ (3 - 1) = 32
VB gives the expected values, but tB values make no sense at all. 3^2 = 8, 4^=16, 5^2 = 32?? Ever suggest parsing was reversed; but that doesn't explain it either; 5^-2 is 0.04, not 32.
To Reproduce
Expected behavior
Values should match VB6.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Weird this bug has gone unnoticed until now.
The text was updated successfully, but these errors were encountered: