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

exponent should be an i16, not i32 #1

Open
sffc opened this issue May 18, 2021 · 0 comments
Open

exponent should be an i16, not i32 #1

sffc opened this issue May 18, 2021 · 0 comments

Comments

@sffc
Copy link

sffc commented May 18, 2021

IEEE floating point only supports decimal exponents from around -308 to +307. This is guaranteed to fit inside an i16. It would be nicer if you could use the smaller type in FloatingDecimal32 and FloatingDecimal64 so that downcasting from i32 to i16 is infallible.

CC @shadaj

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

No branches or pull requests

1 participant