Live data from Hacker News

How big are factorials?

eli.thegreenplace.net

31–40 of 43 posts

Re: How big are factorials?

#32
post #28

My favorite one is with the 52! seconds: Start a timer that will count down the number of seconds from 52! to 0. Then walk around the Earth’s equator with one step every billion years. Then, after you make your way around the earth equator (by taking 1 step every billion of years), you take one drop of water out of the Pacific Ocean. Then, you repeat the process of walking around the equator, and everytime you walk a…

Holy hell, this is great. I once made a little tool for getting more intuitive spatial scales for things in the universe at https://observablehq.com/@ikesau/scale-to-the-universe I feel like you could do something similar for these sorts of "fathom this large number" recipes.

I tried something along the same lines, but not just for size:

http://howmanyelephants.co.uk/

Re: How big are factorials?

#33
post #10
post #5

The author's casual mention of 52! at the opening of the article triggered an OLD webpage that I saw many years ago https://czep.net/weblog/52cards.html Anyone know how to determine the age of this page (it's got be at least 20yrs old)

It was made during the brief XHTML craze. (And it's also invalid XHTML)

I still kind of have a soft spot for XHTML, semantic web and progressive enhancement.

Re: How big are factorials?

#34
post #27

My favorite one is with the 52! seconds: Start a timer that will count down the number of seconds from 52! to 0. Then walk around the Earth’s equator with one step every billion years. Then, after you make your way around the earth equator (by taking 1 step every billion of years), you take one drop of water out of the Pacific Ocean. Then, you repeat the process of walking around the equator, and everytime you walk a…

For another perspective, 52! is roughly the number of atoms in a galaxy. Galaxies are really quite large!

There are more way to rearrange a deck of cards than there are stars in the universe

Re: How big are factorials?

#36
post #3

Reminds me of: Professor asked us to find the biggest factorial using C programming language. And then using LISP. You can imagine our surprise.

I think you mean "using base C without any arbitrary-precision library (e.g. GMP)" . All that illustrates is that Lisp has built-in support for arbitrary-precision arithmetic, whereas C doesn't. Otherwise, how is this surprising, and what is the reason for the performance difference?

Re: How big are factorials?

#37
post #8

Earlier quoted context omitted.

There is a algorithm call Prime Swing Factorial that can compute large factorials exactly in arbitrary precision math using prime factorization. Like 10000000! in under second depending of how optimized the math library it. Probably like 100x faster than the normal method.

Worth noting for anyone reaching for this in practice rather than out of curiosity: several standard library implementations (Python's math.factorial is one) already use a divide-and-conquer multiplication scheme instead of naive sequential multiplication for exactly this reason, so you often get most of that speedup for free without implementing prime swing yourself.

(I just undead'ed this comment; can't see why it was downvoted.)

Re: How big are factorials?

#39
post #38

Earlier quoted context omitted.

24! is approximately Avogadro's number (about a 3% difference).

inverse Gamma function of Avogadro's number (6.02 × 10²³) is ~ 24.99056

Sure, but "23.99067408! is Avogadro's number" is both harder to remember and less cool than "24! is almost Avogadro's number".

Re: How big are factorials?

#40
post #38

Earlier quoted context omitted.

inverse Gamma function of Avogadro's number (6.02 × 10²³) is ~ 24.99056

Sure, but "23.99067408! is Avogadro's number" is both harder to remember and less cool than "24! is almost Avogadro's number".

Sure. I wasn't disagreeing with you; just curious how close the coincidence was.
Post reply on HN