mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-28 01:59:59 +01:00
[poincare] Integer: fix and add tests on Factorial
This commit is contained in:
@@ -336,7 +336,7 @@ Integer NaturalIntegerAbstract::upow(const NaturalIntegerAbstract * i, const Nat
|
||||
Integer NaturalIntegerAbstract::ufact(const NaturalIntegerAbstract * i) {
|
||||
Integer j(2);
|
||||
Integer result(1);
|
||||
while (ucmp(i,j.node()) > 0) {
|
||||
while (ucmp(i,j.node()) >= 0) {
|
||||
result = Integer::Multiplication(j, result);
|
||||
j = Integer::Addition(j, Integer(1));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user