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

Loss of integer precision #2

Open
samstronghammer opened this issue Jan 9, 2024 · 0 comments
Open

Loss of integer precision #2

samstronghammer opened this issue Jan 9, 2024 · 0 comments

Comments

@samstronghammer
Copy link

This library works cleanly and well for decimal-based arithmetic, but I was having some issues with getting precise integral answers when the inputs were large, due to the conversion from integer -> decimal that happens with the division operation. If this sounds like helpful behavior, I'd be interested in contributing this functionality, but wanted to get @SebastianCallh's input first. Would it be best to make a new set of functions that attempt to do lossless division (by checking if the remainder would be zero and doing integer division) or modify the existing functions to support this? Modifying the existing functions would likely cause some amount of a performance hit.

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