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

Add backend-dependent Int::MAX, Int::MIN, Double::MAX, Double::MIN #746

Open
jiribenes opened this issue Dec 12, 2024 · 1 comment
Open
Labels
feature New feature or request

Comments

@jiribenes
Copy link
Contributor

It would be very nice to have constants like Int::MAX, Int::MIN, Double::MAX, Double::MIN that determine the sizes of numeric types available on the available backend.

So for Int::MAX, we'd get:

JavaScript: Number.MAX_SAFE_INTEGER => 2^53 - 1
LLVM: 2^63 - 1 (directly?)
Chez Scheme: ???

Feel free to bikeshed the exact names: my intuition was to make a namespace Int and a namespace Double and put the constants there?

@jiribenes jiribenes added the feature New feature or request label Dec 12, 2024
@jiribenes
Copy link
Contributor Author

As an alternate design, for my use case, I'd also be fine if we limited these by the "worst" backend so that they're uniform. This means that Int::MAX would return 2^53 - 1 even on LLVM.

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

No branches or pull requests

1 participant