The Herbie Project

Find and fix floating-point problems:

sqrt(x+1) - sqrt(x)1/(sqrt(x+1) + sqrt(x))
Herbie detects inaccurate expressions and finds more accurate replacements. The red expression is inaccurate when x > 1; Herbie's replacement, in blue, is accurate for all x.

Use

Learn

Contribute

Herbie improving accuracy on the “Hamming” benchmark suite. Longer arrows are better. Each arrow starts at the accuracy of the original expression, and ends at the accuracy of Herbie’s output, in each case on random double-precision inputs.

Herbie Project News

  1. We are proud to release Herbie 2.0! This release teaches Herbie to optimize for both accuracy and speed, and includes a complete redesign of Herbie's reports and metrics. Try it out!

  2. Due to a major unforseen issue with our release infrastructure, we are re-releasing Herbie 1.5. If you previously tried to install it and failed, please try again!
  3. We're pleased to announce the release of Herbie 1.5, with features like argument sorting and multiple outputs. Do try it out!
  4. Brett and Oliver are giving a talk ARITH 2021 on adding precision tuning to Herbie. Tune in or read the paper to learn more!

  5. Zach and Pavel gave a talk about Herbie's last five years: trust, measurement, community, and generality.
  6. The chaos of 2020 now brings you a rowboat of stability: Herbie 1.4, with significant speed-ups and ease of use improvements. Download and try it today!

  7. David will be talking about FPBench 1.2 and the latest improvements in Herbie at Correctness 2019 in Denver.
  8. Herbie got a shout-out in Pavel's talk at the FP analysis tutorial at SC'19.
  9. Pavel will be joining the University of Utah as an assistant professor next year, joining Ganesh and Zvonimir at what is already a nexus of floating-point research.
  10. Zach gave a keynote at CoNGA’19 on multi-precision, multi-format computations and our efforts to support them in Herbie, FPBench, and Titanic.

  11. Alex gave a talk on our sister project Herbgrind at PLDI’18. Watch it if you want to know how Herbgrind pulls inaccurate floating-point expressions out of large numeric code bases.
  12. After a year of work, Herbie 1.2 has been released. This release focuses on creativity and accuracy, with a new system to infer better branches and more accurate defaults for Herbie's various parameters. Read about all the changes in the release notes.
  13. We teamed up with Heiko and Eva on the Daisy team to combine our tools and evaluate how best to use them together—it'll be published at FM’18. If you're using Herbie with other floating point tools, let us know!
  14. Pavel and Zach went to see Herbie Hancock play at the Seattle Center. Watching Herbie play Chameleon on the keytar is sure to inspire the next generation of floating point accuracy improvement!
  15. Pavel gave a talk at Microsoft Research Redmond on Herbie and Herbgrind, plus the FPBench project. Thank you everyone who came!
  16. Pavel wrote a retrospective on the early history of Herbie, and some lessons learned.

  17. Pavel gave a talk at MPI-SWS Saarbrücken on Herbie, Herbgrind, lessons learned, and what comes next. Thank you Eva Darulova and her students for the invitation and the warm welcome. The video was recorded and can be watched on YouTube.
  18. After incubating on this website, Herbgrind has moved to a new website hosted at UCSD, where Alex, Herbie star and the main Herbgrind developer, is now doing his PhD. We'll continue our close collaboration, including in the FPBench project, and are hoping the new, more-focused websites help users.
  19. Just one month after the beta, Herbie 1.1 has been released. This release adds a browser interface for Herbie, and includes significant bug fixes, usability tweaks, and improvements. Read about all the changes in the release notes.
  20. Our sister project Herbgrind has released version 0.42. This pre-release is a reworked, faster, and more stable Herbgrind, which can find root causes for floating-point errors in the largest and gnarliest of codebases!
  21. After months of work, a beta of Herbie 1.1 has been released. This release adds a browser interface for Herbie, and includes significant bug fixes, usability tweaks, and improvements. Read about all the changes in the release notes.
  22. Zach is giving a talk at the University of Utah about Herbie, FPBench, and Herbgrind. Please come to learn about automated tools for floating point!

  23. After months of work, the Herbie developers are proud to announce the release of Herbie 1.0. This release transitions to the FPCore format from the FPBench initiative, and includes significant bug fixes, usability tweaks, and improvements. Read about all the changes in the release notes.
  24. In preparation for the Version 1.0 release, we've renamed the pi and e constants to upper case. This matches libm and should make it a little harder to cause bugs. Herbie will now optimize expressions like (exp 1) to E.
  25. We're proud to announce that we've been collaborating with Prof. Martel and his students to build a common benchmark suite and format for floating point tools. Version 1.0 of Herbie will support only the FPBench format.
  26. Pavel is giving a talk at Google on how Herbie works and what our plans for the future are.
  27. Pavel is giving a talk at MIT on how Herbie works internally.
  28. In preparation for the Version 1.0 release, we've renamed several functions in Herbie to match the libm names. In particular, look out for abs, which is now fabs, and expt, which is now pow.
  29. Pavel is giving a talk at MathWorks on how Herbie works answered questions on how it could be extended.
  30. The Herbie Rust Linter plugs into the Rust compiler to add warnings for numerically unstable expressions, and suggests Herbie's more accurate output as a hint.

  31. The Herbie GHC Plugin by Mike Izbicki automatically runs Herbie on applicable expressions in a Haskell program. He's also scanned all of Stackage LTS-3.5 for numerical inaccuracies with Herbie.
  32. Pavel is giving a Distinguished Paper talk at PLDI’15 on the scientific advances that underpin Herbie.
  33. Zach is giving a talk at Berkeley on how we plan to improve floating point accuracy with Herbie.

  34. Pavel is giving a talk at OPLSS on whether floating point accuracy can be improved, and our plans for finding out.
  35. Pavel is giving a lightning talk on a new project to improve the accuracy of floating point expressions.
  36. Pavel is giving a talk on at Dropbox on a new project to improve the accuracy of floating point expressions. (video)

The Herbie Developers

Herbie is developed at UW PLSE, with contributions from a supportive community.

The main contributors are Pavel Panchekha, Alex Sanchez-Stern, David Thien, Zachary Tatlock, Jason Qiu, Jack Firth, and James R. Wilcox.