Skip to content
Branch: master
Go to file

Latest commit


Failed to load latest commit information.
Latest commit message
Commit time

Herbgrind -- A Valgrind Tool For Herbie

Herbgrind logo

Herbgrind is a valgrind tool for tracking floating point imprecision in binary programs, inspired by FpDebug. Herbgrind is still pretty early in development, but its goals are:

  • Determining whether a program is generally accurate

  • Identifying places in source code of a binary program where inaccuracy occurs

  • Identifying input distributions of unstable numerical code

  • Extracting enough other information from programs to make improvement with herbie easy

Herbgrind is documented at

Herbgrind is licensed under GPLv3 (and some dependencies are under other, similar licenses). If that doesn't work for your use case, let us know, and we're happy to talk about licensing under other terms.

Installation Instructions


You'll need git, autotools, gawk, GNU sed, and python3 installed to build herbgrind. You can most likely find them in your linux distributions package repositories, or Homebrew if you're on OS X.

To build on OS X, you need XCode Command Line Tools, which you can install with:

$ xcode-select --install

You will also need the GNU versions of awk and sed. The best way to install these is through Homebrew:

$ brew install gawk
$ brew install gnu-sed --with-default-names

Since January 2019, you'll need to follow these instructions to get default names:


The project was developed on a 64-bit linux platform that supports 32-bit compilation. If you're running on a platform like this, running just "make" or "make compile" after cloning the repo should just work. Otherwise, you'll want to open up the toplevel makefile, and modify some variables. Set TARGET_PLAT and ARCH_PRI appropriately for your platform. If you're on a platform for which valgrind wants to build a secondary version (certain 64-bit configurations will cause valgrind to want to do 32-bit too), then set ARCH_SEC to that secondary architecture.

If you just want to configure everything, but not compile, run "make setup".

NEVER modify the code in $toplevel/valgrind/herbgrind, only modify $toplevel/herbgrind. $toplevel/valgrind/herbgrind gets overwritten on every build.


To run, just run "path-to-herbgrind/valgrind/herbgrind-install/bin/valgrind --tool=herbgrind executable-to-run-on"

Herbgrind logo


A Valgrind tool for Herbie




No releases published
You can’t perform that action at this time.