E8005 Math Errors

factorial-overflow

factorial result exceeds maximum value

When this occurs

`math.factorial(21)`

Example error message

error[E8005]: math.factorial() overflow for n > 20

How to fix

Use a smaller input value. Factorial of 20 is the maximum for 64-bit integers.

Related errors