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 overflow in decimal64 #11

Closed
joshcarp opened this issue Jan 3, 2019 · 1 comment
Closed

Exponent overflow in decimal64 #11

joshcarp opened this issue Jan 3, 2019 · 1 comment
Labels
🐛 bug Something isn't working

Comments

@joshcarp
Copy link
Contributor

joshcarp commented Jan 3, 2019

Exponent overflows when adding very large numbers. eg 9e384 + 1e384.
Should add to inf

        x := MustParseDecimal64("9e384")
	y := MustParseDecimal64("1e384")
	z := x.Add(y)

z evaluates to .007199254740992e-383 instead of inf

@juliaogris
Copy link
Contributor

Along the same lines MustParseDecimal64("1e385"") does not panic or return inf but .007199254740992e-383

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants