
The Art of Computer Programming, Volume 2
by Donald Knuth
5mentions
1recommended by
4HN commenters
2019–2026first – last mentioned
25% recommend75% neutral
Affiliate links. As an Amazon Associate I earn from qualifying purchases.

I second this choice. Be sure to get the second edition and to read the various fascicles for Knuth's Volume 4 of Art of Computer Programming. Volume 2 has some useful content as well.
on “Ask HN: Which books do you consider real gems in your field of work/study?” ↗…quite often we find that some old method that is comparatively unsatisfactory has blindly been passed down from one programmer to another, and today’s users have no understanding of its limitations. — The Art of Computer Programming, Volume 2, by Donald Knuth
on “38 People are looking at this post right now” ↗…improvement of Knuth's earlier "reservoir sampling" from the first edition). > All in all, Algorithm R was known to Knuth and Waterman by 1975, and to a wider audience by 1981, when the second edition of The Art of Computer Programming volume 2 was published.
on “Reservoir Sampling” ↗BTW that one isn't a joke made up for this site: it's a verbatim quote from The Art of Computer Programming (Volume 2, page 2). TAOCP is full of silly-but-serious jokes like that.
on “This Is Knuth 3:16 (2002)” ↗…Can't they run an example prompt and verify they get the exact same output token probabilities for all prompts? You don’t even get that with GPUs in general, or really floating point in general. The Art of Computer Programming. Volume 2: Seminumerical Algorithms section 4.2.2 with explain where it loses floating addition associativity property. Apartness relations are another possible lens.
on “Surpassing vLLM with a Generated Inference Stack” ↗