I know how to make the factorial of 1000 using array. But when I try to use larger number, I can result using array and the runtime is too long. Could you help me to make factorial of 10000 without using boost or stl library?
Factorial of big values
hi @leoengufmg, as far as i know only way to calculate factorial of a large number is to simulate elementary multiplication and addition using string or array , boost c++ also uses same method for computation of large numbers, if you are making some project that requires you to calculate factorial of these big numbers then i would suggest you to save the value in a file and do string operation for manupulation ,
the reason it will take a very large amount of time is 10000! has 35,658 values and just traversing once will take close to 1s , so you can imagine how long it will take to compute it
http://gimbo.org.uk/texts/ten_thousand_factorial.txt
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.