Skip to content

i16 and i8 do not print negative values correctly #1337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
certik opened this issue Dec 1, 2022 · 0 comments · Fixed by #1355
Closed

i16 and i8 do not print negative values correctly #1337

certik opened this issue Dec 1, 2022 · 0 comments · Fixed by #1355
Assignees

Comments

@certik
Copy link
Contributor

certik commented Dec 1, 2022

from ltypes import i8, i16, i32, i64
u: i64 = i64(-18)
print(u)
x: i32 = i32(-18)
print(x)
y: i16 = i16(-18)
print(y)
z: i8 = i8(-18)
print(z)

This prints:

$ PYTHONPATH=../src/runtime/ltypes python a.py
-18
-18
-18
-18
$ lpython a.py
-18
-18
65518
238
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants