|
|
I am here and now! (14)
CRUCIVERBALIST
And I know Randor and Greg knew the word: The Lounge[^]
Oh well I'll try an easier one tomorrow - this wasn't supposed to go out for a year or so, but the one I did have for today was wrong, and I didn't notice until I posted it ... so I had to replace it quickly.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I don't see the connection in your clue !
"Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
Right there and right then, I was indeed enjoying crosswords!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
<pedantmode> The dictionaries don't seem to quite agree; some refer to designer, compiler, creator of crosswords; others explicitly state skilled at solving crosswords; whilst others have just "crossword enthusiasts". It could be argued, depending on the definition you happen to be looking at, that someone setting a crossword is not a cruciverbalist and, while you clearly enjoy solving them, you were not solving one "now".</pedantmode>
Does the CP CCC have a "preferred" dictionary (which might be useful to settle disputed spellings / letter counts...)?
|
|
|
|
|
To the Math enthusiasts here:
Is there a method of calculating the number of digits in 2222!
I have been asked by a student, and am not sure of how to arrive at this. Thanks.
|
|
|
|
|
Easy peasy. Stirling's approximation will give you the answer factorial to a few significant digits, and the decimal exponent exactly.
I'm sure you can do it from there...
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Thanks a lot. I didn't know about Stirling's formula.
|
|
|
|
|
Had to prove it in a uni calculus exam, ca 1965. I did then, but I don't think I could now.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Actually you can "just do it", with a computer anyway. It's a big number, but not so big that a computer really struggles with it. It's fast enough to run it on those online code snippet running websites like ideone.
|
|
|
|
|
|
The answer is "one".
It's zero, I just checked:
int n = 2222;
int fact = 1;
for (int i = 1; i <= n; i++)
{
fact *= i;
}
OK, that's because it overflows 32 bits at i = 33, but it's close enough for government work!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
That's the reason for my asking the question.
|
|
|
|
|
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Reminds me of a "calculator" program I wrote back in the early 90s (it was a DOS program that supported stdin/stdout chaining) that treated numbers as strings and thus had no limit in what it could calculate. It supported the four basic operators plus exponent and factorial.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Built-in Win 10 calculator did it for me!
|
|
|
|
|
Didn't realize the built in Windows 10 calculator used the bigint library.
|
|
|
|
|
Me too. Didn't know that the Win10 calculator was so powerful.
|
|
|
|
|
It most likely uses some infinite precision library (I once wrote one, that is not the 'bigint' one!).
It could also sum log10 for all integer from 1 to 2022, take the antilog of the fractional part of the sum and the integer part as the Ennnn value. There is a small risk of roundoff errors, but even if you have a real need for calculating 2222! you rarely need the exact value to 6474 digits of precision.
|
|
|
|
|
Surely not. Type float/double can do it, see my message below.
Luc Pattyn [My Articles]
The Windows 11 "taskbar" is disgusting. It should be at the left of the screen, with real icons, with text, progress, etc. They downgraded my developer PC to a bloody iPhone.
|
|
|
|
|
Amarnath S wrote: nd am not sure of how to arrive at this You make it homework.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
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 ). 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
Mircea
modified 20-Jan-22 9:48am.
|
|
|
|
|
Really good estimate until you rounded it. According to the Windows 10 calculator, it's 3.4310637869208214326346682154289e+6473
|
|
|
|
|
Simple, you don't need integers, not even BigInteger. Try
double val = 1;
int pow10 = 0;
for (int i = 1; i <= 2222; i++) {
val *= i;
while (val > 10) {
val /= 10.0;
pow10++;
}
}
log("val=" + val + "; pow10=" + pow10);
you'll get
val=3.43106378692083; pow10=6473
Luc Pattyn [My Articles]
The Windows 11 "taskbar" is disgusting. It should be at the left of the screen, with real icons, with text, progress, etc. They downgraded my developer PC to a bloody iPhone.
|
|
|
|
|
I bet you are a very good driver and always keep the vehicle well within the margins of the lane.
Great approach.
|
|
|
|