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

Bug in division #18

Closed
peterolson opened this issue Jun 19, 2015 · 1 comment
Closed

Bug in division #18

peterolson opened this issue Jun 19, 2015 · 1 comment

Comments

@peterolson
Copy link

The division

BigInteger.parse("12345678901234567890123456789012345678901234567890123456789012345678901234567890")
  .divide(BigInteger.parse("1234567890"))
  .toString()

should return

"10000000001000000000100000000010000000001000000000100000000010000000001"

but instead returns

"10000000000000000000000000000000000000000000000000000000000000000000000"
@Yaffle
Copy link

Yaffle commented Jun 19, 2015

good catch!

        part._d.unshift(b_digits[--b_index]);
+       part._s = 1;

?

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

2 participants