[math-fun] Wolfram Alpha has disabled very large numbers
Sometime in the 2-3 weeks since I last mentioned the "large factorials" problem, Wolfram Alpha has "fixed" it... by disabling all input that gives an answer higher than about 10^10^9. This is true for inputs like "10^10^10^34", which involve no factorials at all. For example, "2^3250000000" works: http://www.wolframalpha.com/input/?i=2%5E3250000000 but "2^3300000000" gives an error: http://www.wolframalpha.com/input/?i=2%5E3300000000 Of course, large factorials give an error, beyond about 101000000! (the factorial of 101 million), which is about 10^10^8.88... On Thu, Feb 28, 2013 at 12:29 PM, Robert Munafo <mrob27@gmail.com> wrote:
Thanks to each of you for the help.
Meeussen Wouter had the great idea of actually figuring out what Wolfram's "wrong answer" was. In fact it's easy to divide one answer by the other and see the ratio is 20000, which makes it clear what happened. That means that the internals of Wolfram Alpha are actually computing those two results separately, rather than just computing one and then converting it into the other representation. Quite odd.
I had other saved results from Wolfram Alpha for larger factorials, and I can see now that their wrong answers for 30000! and 100000! fit the same pattern: they're computing Gamma[N] when they should be computing Gamma[N+1].
There's another bug for factorials of even larger numbers. In the case of (10^10)! they give only the "power of 10 representation", and their answer is too big rather than being too small, and by a far greater amount. They give 10^10^10^1.0413926851582..., but the correct answer (by GP/PARI and my own implementation) is 10^10^10^1.0406306991294...
In this case it's easy to see that Wolfram's answer is exactly 10^10^11. They are approximating n! as n^n, which "isn't even close" to the truth. Using two terms of the factorial form of the Stirling series [1] and expressing everything as a power of 10:
(10^10)! ~ 10^(0.5*ln(2*pi)/ln(10) + 5 + 10^11 - 10^10/ln(10) + 1/(12*ln(10)*10^10))
(where "ln" is natural logarithm). You can see the dominant term 10^11 in there, but WolframAlpha is ignoring all the rest, which makes a big difference. They are doing the same thing for larger values, for example if you put in (10^20)!, their answer is equivalent to (10^20)^(10^20) = 10^(20*10^20) = 10^10^(21+log(2)/log(10)) = 10^10^10^1.328400603937241. I have reported this to Wolfram as a separate problem.
This started when I was investigating the difference between my computed value of (10^100)! (the factorial of a googol) and the value on someone else's webpage. Googol factorial has been discussed at least as early as 1996; see [2].
- Robert
-- 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
participants (1)
-
Robert Munafo