Click here to Skip to main content
15,889,874 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Factorial of 2222 Pin
David Crow20-Jan-22 2:27
David Crow20-Jan-22 2:27 
GeneralRe: Factorial of 2222 Pin
Rich Leyshon20-Jan-22 2:41
Rich Leyshon20-Jan-22 2:41 
GeneralRe: Factorial of 2222 Pin
obermd20-Jan-22 3:29
obermd20-Jan-22 3:29 
GeneralRe: Factorial of 2222 Pin
Amarnath S20-Jan-22 3:51
professionalAmarnath S20-Jan-22 3:51 
GeneralRe: Factorial of 2222 Pin
trønderen20-Jan-22 11:11
trønderen20-Jan-22 11:11 
GeneralRe: Factorial of 2222 Pin
Luc Pattyn21-Jan-22 7:31
sitebuilderLuc Pattyn21-Jan-22 7:31 
GeneralRe: Factorial of 2222 Pin
Eddy Vluggen20-Jan-22 3:03
professionalEddy Vluggen20-Jan-22 3:03 
GeneralRe: Factorial of 2222 Pin
Mircea Neacsu20-Jan-22 3:38
Mircea Neacsu20-Jan-22 3:38 
Back of the napkin estimate: around 7000.

Reasoning: number of digits is given by log10. Stiriling formula mentioned by Peter says something like n!= O(n^n) (don't remember the whole formula and we are on the back of the napkin with no Google Smile | :) ). That makes number of digits 2222*log10(2222). The log is 3 and a bit (log10(1000) is 3 plus log10(2)). That puts the number of digits around 6666. Allowing for the lost factors in Stirling approximation, 7000 looks like a reasonable estimate.

EDIT: after the back-of-the-napkin estimate, I used the Win10 calculator to find the correct answer: 6473. Also rechecked the Stirling formula. Main reason for the difference is the 1/e^n factor that was missing in my estimate. Anyway a nice brain rinsing exercise Smile | :)
Mircea


modified 20-Jan-22 9:48am.

GeneralRe: Factorial of 2222 Pin
obermd20-Jan-22 6:54
obermd20-Jan-22 6:54 
GeneralRe: Factorial of 2222 Pin
Luc Pattyn21-Jan-22 7:28
sitebuilderLuc Pattyn21-Jan-22 7:28 
JokeRe: Factorial of 2222 Pin
englebart21-Jan-22 10:27
professionalenglebart21-Jan-22 10:27 
GeneralRe: Factorial of 2222 Pin
Luc Pattyn21-Jan-22 10:54
sitebuilderLuc Pattyn21-Jan-22 10:54 
GeneralRe: Factorial of 2222 Pin
BillWoodruff21-Jan-22 21:21
professionalBillWoodruff21-Jan-22 21:21 
RantBest service ever (NOT!) Pin
Sander Rossel20-Jan-22 0:09
professionalSander Rossel20-Jan-22 0:09 
GeneralRe: Best service ever (NOT!) Pin
Greg Utas20-Jan-22 0:28
professionalGreg Utas20-Jan-22 0:28 
GeneralRe: Best service ever (NOT!) Pin
Slacker00720-Jan-22 0:31
professionalSlacker00720-Jan-22 0:31 
GeneralRe: Best service ever (NOT!) Pin
Sander Rossel20-Jan-22 0:55
professionalSander Rossel20-Jan-22 0:55 
GeneralRe: Best service ever (NOT!) Pin
Slacker00720-Jan-22 3:26
professionalSlacker00720-Jan-22 3:26 
GeneralRe: Best service ever (NOT!) Pin
Sander Rossel20-Jan-22 3:26
professionalSander Rossel20-Jan-22 3:26 
GeneralRe: Best service ever (NOT!) Pin
obermd20-Jan-22 3:33
obermd20-Jan-22 3:33 
GeneralRe: Best service ever (NOT!) Pin
Sander Rossel20-Jan-22 3:34
professionalSander Rossel20-Jan-22 3:34 
GeneralRe: Best service ever (NOT!) Pin
lmoelleb20-Jan-22 4:35
lmoelleb20-Jan-22 4:35 
GeneralRe: Best service ever (NOT!) Pin
Luc Pattyn21-Jan-22 7:48
sitebuilderLuc Pattyn21-Jan-22 7:48 
GeneralRe: Best service ever (NOT!) Pin
Richard Deeming20-Jan-22 0:37
mveRichard Deeming20-Jan-22 0:37 
GeneralRe: Best service ever (NOT!) Pin
Sander Rossel20-Jan-22 0:54
professionalSander Rossel20-Jan-22 0:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.