the 'error' is in giving 20000! for the 'decimal representation', but Gamma[20000]=(20000-1)! for the form 10^(10^4.888364627124846) Wouter -----Original Message----- From: math-fun-bounces+wouter.meeussen=vandemoortele.com@mailman.xmission.com [mailto:math-fun-bounces+wouter.meeussen=vandemoortele.com@mailman.xmission.com] On Behalf Of Bill Gosper Sent: donderdag 28 februari 2013 6:17 To: math-fun@mailman.xmission.com Subject: [math-fun] Wolfram Alpha large factorial bug MRob> I discovered a calculation error problem in Wolfram Alpha. When given "20000!" (the factorial of 20000) it gives the answer in two forms: * a "Decimal approximation", 1.8192063202303451348276... x 10^77337 * a "Power of 10 representation", 10^(10^4.888364627124846). My own calculations (using the Stirling series for the log Gamma function) indicate that the first answer is correct. One can see that the second answer disagrees with the first, by computing log(77337+log(1.81920632023)) using base-10 logarithms. The exponent should be 4.888388... not 4.888364... For "LogGamma[20001]", Wolfram Alpha gives 178075.621737198700312867928177..., which agrees with its first 20000! answer and with my calculations. I also checked this in GP/PARI, which of course gives all the digits of 20000!, but you can multiply by 1.0 to put it in the more familiar scientific notation, and it agrees with Wolfram Alpha's first answer. I'd be curious to find out what Mathematica gives (I suspect it will be the correct first answer). I sent feedback to WoldramAlpha to report the problem. -- Robert Munafo -- mrob.com Follow me at: gplus.to/mrob - fb.com/mrob27 - twitter.com/mrob_27 -mrob27.wordpress.com - youtube.com/user/mrob143 - rilybot.blogspot.com In[487]:= N[20000!, 22] Out[487]= 1.819206320230345134828*10^77337 In[488]:= Log[10, Log[10, %]] Out[488]= 4.888388780625234145206724465 In[489]:= N[Log[10, Log[10, 20000!]], 23] Out[489]= 4.8883887806252341452067 --rwg _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun =============================== This email is confidential and intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. You are explicitly requested to notify the sender of this email that the intended recipient was not reached.