fixes #1113 boo
This commit is contained in:
1 parent
18c728db2e
commit
7bd18a27e4
1 file changed
+4
@@ -29,6 +29,10 @@ public class Arithmetic {
|
|||||||
}
|
}
|
||||||
return new NumericValue(factorial);
|
return new NumericValue(factorial);
|
||||||
}
|
}
|
||||||
|
else if (number > 170)
|
||||||
|
{
|
||||||
|
return NumericValue.of(Double.MAX_VALUE);
|
||||||
|
}
|
||||||
// values over 21 will exceed long limits
|
// values over 21 will exceed long limits
|
||||||
double factorial = 1.0;
|
double factorial = 1.0;
|
||||||
for (int i = 1; i <= number; i++)
|
for (int i = 1; i <= number; i++)
|
||||||
|
|||||||
Reference in new issue
Block a user