2 ms·
The space usage for this function is obviously constant and, yes, the number of multiplications is linearly dependent on the number. But it is not a factorial
by tomjen3 15y ago
The space usage for this function is obviously constant and, yes, the number of multiplications is linearly dependent on the number.
But it is not a factorial function. It happens to have the same result as the factorial function as long as the result is less than what can be stored in a fixnum int in C.
But it is a very real possibility that that isn't enough. I always wanted to find out what the sum of the factorial of the first 100 numbers was but what you claim is a factorial function can't do that.