-
Notifications
You must be signed in to change notification settings - Fork 11
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
Fix Quotient function to pass dectests #50
Conversation
joshcarp
commented
Jun 11, 2019
- Change Quotient method to pass dectests
- Pass half up and half even rounding
- Use type of binary rounding to keep track of remainders
return infinities[sign] | ||
dp.matchSignificandDigits(&ep) | ||
ans.exp = dp.exp - ep.exp | ||
for { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the idea is that there's no way of knowing how much precision the answer will take up in the final answer Without using binary long division. Here we are doing long division, but we keep adjusting the exponent (and the significand) by multiplying it by 10 until we get to the point where we've filled up our precision, then the remainder is rounded. Other methods of division cannot be used because truncation occurs without notice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me
* Add matchsignificand size function * Add first Implementation of Quo * Quo function with some rounding * Add context for quo