A Programmer's Order: The Root Beer Float(ing Point)
Why is this CS Fundamentals meme funny?
Level 1: The Almost-One Root Beer
A customer asks for one root beer, but says it weirdly: "one point zero zero zero zero zero zero one one nine root beers." Why? Because computers are like a measuring cup with lines only at certain spots — if you ask for an amount between the lines, you get the nearest line instead. So when a computer tries to hold the number "one," sometimes it grabs the line right next to it. The bartender turns it into a drink pun, the programmer turns it back into a math pun, and everyone goes home happy except the number one, which is still slightly more than itself.
Level 2: Why Computers Can't Count to One
The premise to absorb: computers store decimal numbers in a format called floating point, and that format has limited precision — like writing numbers on a receipt that only has room for so many digits. Two common sizes exist in most languages:
float— 32 bits, roughly 7 reliable decimal digitsdouble— 64 bits, roughly 15–16 reliable decimal digits
When a value doesn't fit exactly, the computer silently rounds to the nearest number it can store. Near 1.0, the smallest step a float can take is about 0.000000119 — which is exactly the quantity ordered in the joke. You've probably already met this bug without knowing its name:
>>> 0.1 + 0.2
0.30000000000000004
Nothing is broken; the computer just can't represent 0.1 exactly in binary, the same way you can't write 1/3 exactly in decimal. The practical rules juniors eventually internalize: never compare floats with == (compare within a small tolerance instead), never store money in floats (use integer cents or a decimal type), and when precision problems appear, switching float → double is the quick fix — i.e., "make it a double."
Level 3: A Triple Pun With Zero Wasted Tokens
What earns this tweet — by Carlos Bueno (@Archivd) — its permanent slot in the dev-joke canon is its density. Read the text again:
A programmer walks into a bar and orders 1.000000119 root beers. The bartender says, "I'm gonna have to charge you extra; that's a root beer float". And the programmer says, "Well in that case make it a double".
Three loads per word, no slack: float is simultaneously the soda-fountain drink (root beer + ice cream) and the 32-bit type whose rounding behavior produced the absurd quantity in the first sentence. Double is simultaneously the bar order ("make it a double") and the 64-bit type you upgrade to when float precision bites you. Even the setup is technical: the bartender, like a strict type checker, observes that the customer's "1" has float artifacts and reclassifies it — 1.000000119 literally is a float, in both senses. The bartender is performing type inference.
The joke also encodes a genuine engineering reflex. The standard industry response to floating-point error is exactly the programmer's response: don't fix the representation, just throw more bits at it. Promote float to double, hope epsilon shrinks below your tolerance, ship it. It usually works, which is why almost nobody reaches for the principled alternatives — fixed-point arithmetic, arbitrary-precision decimals, or rational types — until a financial system rounds someone's money the wrong way and a very serious meeting gets scheduled. Anyone who has stored currency as a float and met the auditors afterward laughs at this joke differently than everyone else.
Level 4: Epsilon at the Bar
The number in the tweet — 1.000000119 — is not random flavor text; it's a precise citation of IEEE 754 single-precision arithmetic. A 32-bit float stores a number as 1 sign bit, 8 exponent bits, and 23 fraction (mantissa) bits. With 23 explicit fraction bits plus the implicit leading 1, the gap between representable values near 1.0 — the machine epsilon — is exactly:
$$
\varepsilon_{float32} = 2^{-23} \approx 1.19209 \times 10^{-7}
$$
So the next representable single-precision value after 1.0 is approximately 1.000000119209.... The programmer in the joke isn't ordering a weird quantity of root beer; they're ordering nextafter(1.0f, 2.0f) — the smallest possible "more than one" that a 32-bit float can express. Any value between 1.0 and that epsilon neighbor simply does not exist in float32; it gets rounded to one or the other. This is the deep truth the joke is built on: floating point is not the real number line, it's a finite lattice of about 4 billion points distributed logarithmically, dense near zero and sparse out at large magnitudes.
The "make it a double" punchline then carries real numerics: promoting to a 64-bit double (52 fraction bits) shrinks epsilon to $2^{-52} \approx 2.22 \times 10^{-16}$ — nine extra decimal digits of precision. The same "one root beer" in double precision would be 1.0000000000000002. This precision hierarchy is why scientific computing defaults to doubles, why machine learning went the other way (fp16/bfloat16, trading precision for throughput), and why the canonical interview gotcha 0.1 + 0.2 != 0.3 exists: 0.1 has an infinite repeating expansion in binary, so finite mantissas must truncate it, and the error surfaces on comparison. William Kahan won the Turing Award largely for shepherding IEEE 754 into existence in 1985, replacing a chaos of incompatible vendor formats — the joke is, in a real sense, a one-liner about the most successful standardization effort in numerical computing.
Description
A screenshot of a tweet from user Carlos Bueno (@Archivd). The text tells a classic programmer joke: 'A programmer walks into a bar and orders 1.000000119 root beers. The bartender says, "I'm gonna have to charge you extra; that's a root beer float". And the programmer says, "Well in that case make it a double".' The humor is a multi-layered pun based on computer science data types. 'Float' refers to single-precision floating-point numbers, which often have tiny precision errors, resulting in values like 1.000000119 instead of exactly 1. The programmer's response, 'make it a double,' is also a double entendre, referring to both a double-sized drink and the 'double' data type, which has significantly more precision than a float. This joke is a staple in developer communities, especially appreciated by those who have been bitten by floating-point arithmetic bugs
Comments
8Comment deleted
The original programmer was happy with his double, but the JavaScript developer who ordered next was confused when his 0.1 + 0.2 root beers didn't quite fill the glass
Turns out ordering 1.000000119 root beers is the fastest path from “harmless precision tweak” to “full-scale migration to decimal128 - plus a mandatory double to cope with the audit.”
The real joke is that after 20 years in this industry, we still explain floating-point arithmetic to product managers using the exact same 0.1 + 0.2 != 0.3 example, and they still ship features that compare currency values with ==
The bartender should've charged in cents stored as floats - then the programmer's tab would've rounded itself off anyway
This joke brilliantly captures the eternal struggle of floating-point arithmetic - where asking for exactly 1.0 is apparently too much to ask from your CPU. The programmer's response is chef's kiss: when life gives you precision errors, upgrade to double precision. It's the numerical equivalent of 'if it compiles, ship it' - except here, if it floats, double it. Every senior engineer who's debugged financial calculations knows that 0.1 + 0.2 ≠ 0.3, and this bartender clearly understands IEEE 754 better than most junior devs understand their own codebase
I ordered 1 root beer +/- 1 ULP; bartender served a float. I said make it a double - after two decades of IEEE-754, I'll pay for the headroom
Bartender spotted the ulp drift in that float order - programmer's epsilon just cost him a premium pour
Production fix: migrate the bar’s schema from float to Decimal128 before the CFO notices the tab accumulating ULPs