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

Should use String or Int for BigDecimal value #203

Merged
merged 1 commit into from Jan 13, 2018
Merged

Should use String or Int for BigDecimal value #203

merged 1 commit into from Jan 13, 2018

Conversation

michael-newsrx
Copy link
Contributor

Should use string and not double or float when constructing a BigDecimal to prevent floating point errors from getting introduced.
Or use a long or int combined with a decimal shift operation: new BigDecimal("1.001") or new BigDecimal(1001).movePointLeft(3);

Should use string and not double or float when constructing a BigDecimal to prevent floating point errors from getting introduced.
Or use a long or int combined with a decimal shift operation: new BigDecimal("1.001") or new BigDecimal(1001).movePointLeft(3);
@marvin-we
Copy link
Owner

Thanks @michael-newsrx - Really appretiate that =)

Do you plan to submit this pull request through utopian or can I leave it open for 1-2 days as a reminder to check if I have made this mistake in some other places?

@marvin-we marvin-we added this to the 0.5.0 milestone Jan 10, 2018
@marvin-we marvin-we merged commit ecffd3e into marvin-we:master Jan 13, 2018
@michael-newsrx michael-newsrx deleted the patch-1 branch January 16, 2018 15:20
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.

None yet

2 participants