Skip to content

Commit

Permalink
fix int division
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashvin-Ranjan committed Dec 10, 2021
1 parent 0f419a9 commit 57c4a56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/n.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

init()

VERSION = "N v0.0"
VERSION = "N v0.0.1"
except KeyboardInterrupt:
exit()

Expand Down
2 changes: 2 additions & 0 deletions python/scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,8 @@ async def eval_expr(self, expr):
return float("-inf")
else:
return float("inf")
if isinstance(divisor, int):
return math.floor(dividend/divisor)
return dividend / divisor
elif operation.type == "MODULO":
return await self.eval_expr(left) % await self.eval_expr(right)
Expand Down

0 comments on commit 57c4a56

Please sign in to comment.