{"slug": "herbie", "name": "Herbie", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "", "recommenders": 4, "commenters": 7, "warners": 1, "score": 3.265, "rising": 0.02, "first": "2026-04-03", "latest": "2026-09-22", "why": "Herbie analyzes your math expressions and helps you figure out where FP error accumulates.", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 4, "neutral": 1, "compare": 1, "warn": 1}, "spark": [0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 1, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "Herbie analyzes your math expressions and helps you figure out where FP error accumulates.", "kind": "", "icon": true, "domain": "uwplse.org", "github_repo": null, "official_url": "https://herbie.uwplse.org", "pricing": "", "aliases": ["Herbie"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 796743808, "item_id": 49796488, "url": "https://news.ycombinator.com/item?id=49796488", "by": "ashton314", "date": "2026-09-22", "stance": "recommend", "quote": "Herbie analyzes your math expressions and helps you figure out where FP error accumulates.", "excerpt": "Also of interest: Herbie analyzes your math expressions and helps you figure out where FP error accumulates. https://herbie.uwplse.org/demo/ We use floats as a trade-off between speed and accuracy. IEEE 754 is a very reasonable trade-off for a wide range of applications, but if you can figure out where you need to trade speed to get more accuracy with e.g. one of the methods mentioned here, Herbie's gotcha covered. I", "context": "", "use_case": "floating point error analysis", "switched_from": "", "story": "More floating point alternatives"}, {"id": 779988640, "item_id": 48749290, "url": "https://news.ycombinator.com/item?id=48749290", "by": "tialaramex", "date": "2026-07-01", "stance": "recommend", "quote": "My hope for the future is that Herbie's approach can evolve", "excerpt": "I was expecting them to be aware of https://herbie.uwplse.org/ Herbie but it seems like either they don't know of it or they don't see it as relevant. My hope for the future is that Herbie's approach can evolve to a point where the person writing the software doesn't directly write FPU operations, any more than you'd manually work out all the best ways to optimise integer arithmetic. You write what you meant and the ", "context": "", "use_case": "Floating-point accuracy optimization", "switched_from": "", "story": "Compiler-Assisted Floating-Point Error Analysis and Profiling with FPChecker"}, {"id": 762206912, "item_id": 47637932, "url": "https://news.ycombinator.com/item?id=47637932", "by": "summarity", "date": "2026-04-04", "stance": "recommend", "quote": "this is Herbie's core strength", "excerpt": "I posted this and it picked up steam over night, so I thought I'd add how I'm using it: I work on 3D/4D math in F#. As part of the testing strategy for algorithms, I've set up a custom agent with an F# script that instruments Roslyn to find FP and FP-in-loop hotspots across the codebase. The agent then reasons through the implementation and writes core expressions into an FPCore file next to the existing tests, runni", "context": "Works on 3D/4D math in F#", "use_case": "Improving floating-point formulas", "switched_from": "", "story": "Herbie: Automatically improve imprecise floating point formulas"}]}], "caveats": [{"label": "", "summary": "", "quotes": [{"id": 762158032, "item_id": 47634877, "url": "https://news.ycombinator.com/item?id=47634877", "by": "fluorinerocket", "date": "2026-04-03", "stance": "warn", "quote": "How useful is this when you are using numbers in a reasonable range, like 10^-12 to 10^12?", "excerpt": "How useful is this when you are using numbers in a reasonable range, like 10^-12 to 10^12? Generally I try to scale my numbers to be in this range, whether by picking the right units or scaling constraints and objectives when doing nonlinear programming/ optimization. Like looking at this example, https://herbie.uwplse.org/demo/b070b371a661191752fe37ce0321c3e813691aa6.0cc3b6492c83efca5bd11399e0830e7873c749d9/graph.ht", "context": "", "use_case": "", "switched_from": "", "story": "Herbie: Automatically improve imprecise floating point formulas"}]}], "who": [{"by": "summarity", "context": "Works on 3D/4D math in F#", "url": "https://news.ycombinator.com/item?id=47637932", "date": "2026-04-04"}], "tags": [], "use_cases": ["floating point error analysis", "floating-point accuracy improvement", "floating-point accuracy optimization", "improving floating-point formulas"], "compared": [], "makers": [{"id": 788923136, "item_id": 49307696, "url": "https://news.ycombinator.com/item?id=49307696", "by": "pavpanchekha", "date": "2026-08-14", "stance": "neutral", "quote": "maintaining the Herbie numerical compiler", "excerpt": "I do a substantial amount of coding in Racket, including maintaining the Herbie numerical compiler (https://herbie.uwplse.org/) over the last decade. Racket is great! The runtime is reasonably fast, and the standard library is exceptionally featureful, including, for example, a decent plotting library, an HTTP server, decent HTML and JSON support, several forms of multi-threading, and a quite good FFI, all of which H", "context": "", "use_case": "numerical accuracy optimization", "switched_from": "", "story": "Racket v9.3"}, {"id": 762226496, "item_id": 47639156, "url": "https://news.ycombinator.com/item?id=47639156", "by": "pavpanchekha", "date": "2026-04-04", "stance": "neutral", "quote": "Author here. The speed up is modeled throughput, though the model is relatively naive.", "excerpt": "Author here. The speed up is modeled throughput, though the model is relatively naive. It's possible to disable branches by turning off the regimes flag, see https://herbie.uwplse.org/doc/1.0/options.html", "context": "author of the tool", "use_case": "Floating-point formula optimization", "switched_from": "", "story": "Herbie: Automatically improve imprecise floating point formulas"}], "threads": [{"url": "https://news.ycombinator.com/item?id=47585469", "title": "Herbie: Automatically improve imprecise floating point formulas", "mentions": 6}, {"url": "https://news.ycombinator.com/item?id=48726407", "title": "Compiler-Assisted Floating-Point Error Analysis and Profiling with FPChecker", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=49771543", "title": "More floating point alternatives", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=49302562", "title": "Racket v9.3", "mentions": 1}], "sentiment_by_month": {"2025-11": {}, "2025-12": {}, "2026-01": {}, "2026-02": {}, "2026-03": {}, "2026-04": {"warn": 1, "recommend": 1, "compare": 1, "neutral": 1}, "2026-05": {}, "2026-06": {}, "2026-07": {"recommend": 2}, "2026-08": {}, "2026-09": {"recommend": 1}, "2026-10": {}}, "quotes": [{"id": 796743808, "item_id": 49796488, "url": "https://news.ycombinator.com/item?id=49796488", "by": "ashton314", "date": "2026-09-22", "stance": "recommend", "quote": "Herbie analyzes your math expressions and helps you figure out where FP error accumulates.", "excerpt": "Also of interest: Herbie analyzes your math expressions and helps you figure out where FP error accumulates. https://herbie.uwplse.org/demo/ We use floats as a trade-off between speed and accuracy. IEEE 754 is a very reasonable trade-off for a wide range of applications, but if you can figure out where you need to trade speed to get more accuracy with e.g. one of the methods mentioned here, Herbie's gotcha covered. I", "context": "", "use_case": "floating point error analysis", "switched_from": "", "story": "More floating point alternatives"}, {"id": 780024240, "item_id": 48751515, "url": "https://news.ycombinator.com/item?id=48751515", "by": "AlotOfReading", "date": "2026-07-01", "stance": "recommend", "quote": "", "excerpt": "FPChecker and Herbie are complementary. FPChecker runs the dynamic analysis to figure what your code is actually doing under realistic workloads, which gives you the information to make those code improvements via other tools like Herbie. Part of the issue with saying what you mean in numerical code is that approximately no-one outside a small cadre of experts bothers to do numerical analysis. And unless you're in HP", "context": "", "use_case": "Floating-point accuracy improvement", "switched_from": "", "story": "Compiler-Assisted Floating-Point Error Analysis and Profiling with FPChecker"}, {"id": 779988640, "item_id": 48749290, "url": "https://news.ycombinator.com/item?id=48749290", "by": "tialaramex", "date": "2026-07-01", "stance": "recommend", "quote": "My hope for the future is that Herbie's approach can evolve", "excerpt": "I was expecting them to be aware of https://herbie.uwplse.org/ Herbie but it seems like either they don't know of it or they don't see it as relevant. My hope for the future is that Herbie's approach can evolve to a point where the person writing the software doesn't directly write FPU operations, any more than you'd manually work out all the best ways to optimise integer arithmetic. You write what you meant and the ", "context": "", "use_case": "Floating-point accuracy optimization", "switched_from": "", "story": "Compiler-Assisted Floating-Point Error Analysis and Profiling with FPChecker"}, {"id": 762293568, "item_id": 47643348, "url": "https://news.ycombinator.com/item?id=47643348", "by": "bhargavkk", "date": "2026-04-04", "stance": "neutral", "quote": "Herbie uses interval arithmetic a lot!", "excerpt": "Herbie uses interval arithmetic a lot! The team has a in-house developed interval arithmetic library you can use at: https://crates.io/crates/rival3.", "context": "", "use_case": "", "switched_from": "", "story": "Herbie: Automatically improve imprecise floating point formulas"}, {"id": 762265776, "item_id": 47641611, "url": "https://news.ycombinator.com/item?id=47641611", "by": "fouronnes3", "date": "2026-04-04", "stance": "compare", "quote": "I wonder if you could combine the two techs to make something even more powerful.", "excerpt": "This is very interesting! I made an interval arithmetic calculator a few months ago [0]. I wonder if you could combine the two techs to make something even more powerful. [0] https://victorpoughon.github.io/interval-calculator/", "context": "", "use_case": "", "switched_from": "", "story": "Herbie: Automatically improve imprecise floating point formulas"}, {"id": 762226752, "item_id": 47639172, "url": "https://news.ycombinator.com/item?id=47639172", "by": "pavpanchekha", "date": "2026-04-04", "stance": "neutral", "quote": "Documented here but yes it's an average", "excerpt": "Documented here but yes it's an average, of something similar to but not exactly the same as relative error: https://herbie.uwplse.org/doc/latest/error.html It's true that averages can be misleading but we encourage users to think about it instead as a percentage of inputs. In practice the error distribution is very bimodal, the two modes being \"basically fine\" (a few ulps of error) and \"garbage\" (usually 0 instead o", "context": "", "use_case": "", "switched_from": "", "story": "Herbie: Automatically improve imprecise floating point formulas"}, {"id": 762206912, "item_id": 47637932, "url": "https://news.ycombinator.com/item?id=47637932", "by": "summarity", "date": "2026-04-04", "stance": "recommend", "quote": "this is Herbie's core strength", "excerpt": "I posted this and it picked up steam over night, so I thought I'd add how I'm using it: I work on 3D/4D math in F#. As part of the testing strategy for algorithms, I've set up a custom agent with an F# script that instruments Roslyn to find FP and FP-in-loop hotspots across the codebase. The agent then reasons through the implementation and writes core expressions into an FPCore file next to the existing tests, runni", "context": "Works on 3D/4D math in F#", "use_case": "Improving floating-point formulas", "switched_from": "", "story": "Herbie: Automatically improve imprecise floating point formulas"}, {"id": 762158032, "item_id": 47634877, "url": "https://news.ycombinator.com/item?id=47634877", "by": "fluorinerocket", "date": "2026-04-03", "stance": "warn", "quote": "How useful is this when you are using numbers in a reasonable range, like 10^-12 to 10^12?", "excerpt": "How useful is this when you are using numbers in a reasonable range, like 10^-12 to 10^12? Generally I try to scale my numbers to be in this range, whether by picking the right units or scaling constraints and objectives when doing nonlinear programming/ optimization. Like looking at this example, https://herbie.uwplse.org/demo/b070b371a661191752fe37ce0321c3e813691aa6.0cc3b6492c83efca5bd11399e0830e7873c749d9/graph.ht", "context": "", "use_case": "", "switched_from": "", "story": "Herbie: Automatically improve imprecise floating point formulas"}]}