Skip to content
DevMeme
4275 of 7435
Mathematicians mock floats and doubles trying to approximate real fractions
CS Fundamentals Post #4672, on Jul 19, 2022 in TG

Mathematicians mock floats and doubles trying to approximate real fractions

Description

Two-panel Invincible meme: In the top frame, a cloudy sky holds two fighter jets; the lead jet is labelled “DOUBLE” and the trailing jet “FLOAT”. In the foreground, the caped, muscular character (face redacted) is overlaid with the text “MATHEMATICIANS”, glaring sideways at another off-screen figure. The bottom frame shows the same mathematician character speaking while subtitle text reads, “Look what they need to mimic a fraction” followed by a blacked-out rectangle. The humor highlights how programming numeric types float and double can only approximate exact rational values that mathematicians treat precisely, lampooning floating-point precision limitations in computer science

Comments

6
Anonymous ★ Top Pick Mathematician: “Just store 1/3 exactly.” 20-year staff engineer: “Sure - let me spin up three microservices, a Decimal128 migration, and double our AWS bill so finance can enjoy one more repeating 3.”
  1. Anonymous ★ Top Pick

    Mathematician: “Just store 1/3 exactly.” 20-year staff engineer: “Sure - let me spin up three microservices, a Decimal128 migration, and double our AWS bill so finance can enjoy one more repeating 3.”

  2. Anonymous

    After 20 years in the industry, you realize the real IEEE 754 standard was the rounding errors we accumulated along the way

  3. Anonymous

    Mathematicians looking at IEEE 754 floating-point like 'you need 64 bits just to approximate what I can write as 1/3?' Meanwhile, we're over here debugging why 0.1 + 0.2 !== 0.3 and explaining to stakeholders that no, we can't just 'fix the math' - it's a fundamental tradeoff between performance and precision that's been baked into hardware since the 1980s. At least we have BigDecimal for when the finance team inevitably asks why their penny calculations are off

  4. Anonymous

    Only in enterprise will we ship Kahan summation, ULP thresholds, and a rounding RFC just to avoid saying the forbidden word: Decimal

  5. Anonymous

    Floats: deploying binary mantissa squadrons because exact rationals would crash the budget

  6. Anonymous

    Mathematicians write 1/3; we ship IEEE-754, ULPs, four rounding modes, and a postmortem on why two replicas disagree about 0.1

Use J and K for navigation