go to previous page   go to home page   go to next page


Maybe. Even with double, overflow is reached at N==170.

Another problem with double is that the result is only an approximation to the exact value. doubles have the equivalent of about 15 decimal digits of accuracy. This might not be good enough.

Live Factorial Calculator

Here is a Javascript version of the factorial calculator:

Enter N:

Try some values for N that test the boundaries: -1, 0, 20. Then try some small values like 6 or 12.


If you drop a brick from a tower, what happens?