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

factorial function should change #10

Closed
dpaukov opened this issue Oct 8, 2014 · 2 comments
Closed

factorial function should change #10

dpaukov opened this issue Oct 8, 2014 · 2 comments

Comments

@dpaukov
Copy link
Owner

dpaukov commented Oct 8, 2014

From [email protected] on March 13, 2014 05:05:11

factorial must change to ==>

public static BigDecimal factorial(long x) {
BigDecimal result = BigDecimal.valueOf(1);
for (long i = 2; i <= x; i++) {
result=result.multiply(BigDecimal.valueOf(i));
}
return result;
}

becos is x is big enough,result will bigger than Long.maxVal()

Original issue: http://code.google.com/p/combinatoricslib/issues/detail?id=10

@dpaukov
Copy link
Owner Author

dpaukov commented Oct 8, 2014

From [email protected] on June 19, 2014 09:35:47

Scheduled for the release 2.2

@dpaukov dpaukov added this to the 2.2 milestone Apr 16, 2015
@dpaukov
Copy link
Owner Author

dpaukov commented Apr 17, 2015

Done, merged into the master branch (04/17/2015)

@dpaukov dpaukov closed this as completed Apr 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant