Calculate factorial of a non-negative integer. Memoized — repeat calls reuse cached intermediates. Returns Infinity once n! overflows the IEEE 754 double range (around n = 171).
Infinity
n!
n = 171
Calculate factorial of a non-negative integer. Memoized — repeat calls reuse cached intermediates. Returns
Infinityoncen!overflows the IEEE 754 double range (aroundn = 171).