Got this while testing the % operator alongside math.mod in Lpython -
def f():
print((8)%3)
print((8)%(3))
print(-(8)%3) #wrong
print((8)%-3) #wrong
print(-(8)%-3)
print((-8)%3) #wrong
print(-8%3) #wrong
f()
(lp) C:\Users\kunni\lpython>python try.py
2
2
1
-1
-2
1
1
(lp) C:\Users\kunni\lpython>src\bin\lpython try.py
2
2
-2
2
-2
-2
-2