Herbie aims to make floating point problems easier to find and fix.

Use

Learn

Contribute

sqrt(x + 1) - sqrt(x)1/(sqrt(x+1) + sqrt(x))
Herbie can detect inaccurate floating point expressions and gives you more-accurate replacements. The red expression gives inaccurate answers when x > 0; Herbie rewrites it into the green expression, accurate for all x.

Documentation

Longer arrows are better. Each arrow measures an improvement in accuracy due to Herbie. Each arrow points from the accuracy of the original program, and to the accuracy of Herbie’s output, in each case on random double-precision inputs.

Herbie Project News

  1. 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.
  2. 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.
  3. 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.
  4. 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!
  5. 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.
  6. 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!

  7. 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.
  8. 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.
  9. 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.
  10. Pavel is giving a talk at Google on how Herbie works and what our plans for the future are.
  11. Pavel is giving a talk at MIT on how Herbie works internally.
  12. 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.
  13. Pavel is giving a talk at MathWorks on how Herbie works answered questions on how it could be extended.
  14. 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.

  15. 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.
  16. Pavel is giving a Distinguished Paper talk at PLDI’15 on the scientific advances that underpin Herbie.
  17. Zach is giving a talk at Berkeley on how we plan to improve floating point accuracy with Herbie.

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

Blog posts about Herbie

The Herbie Developers

Herbie is chiefly developed at the University of Washington Programming Languages and Software Engineering group, with contributions from a supportive community.

  1. Pavel Panchekha
  2. Alex Sanchez-Stern
  3. Jason Qiu
  4. Jack Firth
  5. James R. Wilcox
  6. Zachary Tatlock