Hacker News new | ask | show | jobs
by bscphil 832 days ago
You can show this with a easy one-liner in a lot of languages, e.g. Julia:

  $ julia -E 'log2(factorial(big(52)))'
  225.581003123702761946342444376665612911126819036757601937313805865615023286654
(It's also just math, of course, but it's nice to have a quick way to check these things.)
2 comments

Since log(xy) = log(x) + log(y), you can simply calculate sum(log2(i) for i in range(1, 53)) :) might be a nicer formulation for when you don’t have arbitrary precision support.
Or you can use the `bc` that's shipped with macOS.

    echo 'l(f(52))/l(2)' | bc -l
    225.58100312370276194868
(`l(x)` is natural log, hence the `/l(2)` to convert to `log2`)

Annoyingly, GNU `bc` doesn't have `f(x)`.