How to find factorial length without find factorial?
Answers
Answered by
0
To generalize to n! with larger n, make use of Stirlings's approximation n!≈nne−n2πn−−−√, so log10n≈n(log10n−log10e)+12log10n+log102π−−√. With n=10 this latter approximation gives 6.556145… whereas the exact value of log1010! is 6.559763…; the aprroximation is already quite close and both the exact and the approximate value give 7 digits after applying floor and adding one (as per Alex' formula).
Similar questions