Skip to content
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

feat: added Int128 and UInt128 to integers docs #413

Closed
wants to merge 1 commit into from
Closed

feat: added Int128 and UInt128 to integers docs #413

wants to merge 1 commit into from

Conversation

krthr
Copy link
Contributor

@krthr krthr commented Jun 20, 2020

@straight-shoota
Copy link
Member

straight-shoota commented Jun 20, 2020

The documentation is actually missing on purpose: 128-bit literals don't work correctly. The implementation is based on Int64, so the valid range of these literals is only Int64::MIN..Int64::MAX.

# literal for Int64::MAX + 1
9223372036854775808_i128 # Argument error (compiler bug): Invalid Int64: 9223372036854775808

Until the literals are working correctly, it shouldn't be documented. (We could consider documenting the limitations, but there's no effective benefit over 64-bit literals, so there's no point in using actual 128-bit literals).

/cc crystal-lang/crystal#8373

@straight-shoota
Copy link
Member

Alternative PR: #361

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants