-
Notifications
You must be signed in to change notification settings - Fork 6
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
Confused on Division Implementation #7
Comments
Sure go ahead. |
Done, I believe. |
To answer your question about the truncation in the '/' division, have a look at the README.md file. It explains the design decisions made. Basically some divisions could result in infinite decimal calculations so this is a practical way of avoiding this situation. A 'divide' function provides additional arguments to allow as much precision as desired during extended calculations. |
Hey! Thank you for the follow ups. Yup makes sense. I ended up needing a lot more |
Hello!
More of an implementation question than anything else, buy why does the '/' operation truncate by default?
And if possible, can there instead be two '/' functions? One that keeps the original functionality but returns it as the relevant int type instead, and another that just returns the '.divide' function as a decimal. Or perhaps replace the current function with '÷' and use '/' for '.divide'?
This would just make it much easier to use the package as a drop in replacement for a double. If you agree with the change, I can even create the pull request.
The text was updated successfully, but these errors were encountered: