Herbie reports

The Herbie report

When used in the browser, Herbie generates HTML reports full of information about the accuracy of your input and its output expressions.

Summary numbers

First, a brief summary of the results. For most uses, the “Average Error” number, which describes how accurate the input and output expressions are, is the most important statistic in this section. The other numbers list time Herbie took to improve the program and the precision assumed for floating-point operations.

Summary numbers from a Herbie report. The "binary64" precision refers to double-precision IEEE-754 arithmetic.

Input and output programs

Second, the input and output programs themselves, in standard mathematical syntax. In the top-right corner, the drop-down can be used to switch to C syntax or some other format.

Input and output program from a Herbie report.

Error graph

Third, under Error, a graph of floating-point error versus input value. This is helpful for understanding the sorts of inputs Herbie is improving accuracy on. Sometimes, Herbie improved accuracy on some inputs at the cost of accuracy on other inputs that you care more about. You can add a precondition to restrict Herbie to certain inputs in those cases.

These graphs show the error of the input program with a red line, and the error of the output program with a blue line. Both can be toggled. If the expression has multiple variables, the variable picker on the bottom left selects which variable is placed on the horizontal axis. If Herbie decided to insert an if statement into the program, the locations of those if statements will be marked with vertical bars.

An error graph from a Herbie report. Note the variable selector (x is selected) and the toggles for the input and output program (both are toggled on).

Interactive inputs

Fourth, a interactive form where you can the output of both your and Herbie's programs. on inputs of your choice Enter argument values on the left, and the input and output programs will be evaluated on those arguments and the results printed on the right.

The interactive section of a Herbie report. "In" is your program, "Out" is Herbie's.

Derivation

Fifth, Herbie's derivation of its output program. These can be helpful in understanding how Herbie works. Each substantive step in the derivation also lists the error, in bits, of that step's output. Sometimes you can use that to pick a less-complex and not-substantially-less-accurate program.

Derivations sometime name arithmetic laws used by Herbie, or they might claim derivation steps are done by simplification, series expansion, or other Herbie strategies. The derivation will also call out any time the input is split into cases. When one part of the program is colored blue, that is the part modified in that derivation step.

A short derivation from a Herbie report. Note the error, in gray, measured after each derivation step.

Reproduction

Sixth, a command to reproduce this Herbie result. If you find a Herbie bug, include this code snippet when filing an issue.

Reproduction information for a Herbie run. You can use this when submitting bug reports.

The top of the page has a right-hand menu bar with additional links. “Report” returns you to Herbie's main page. “Log” and “Metrics” give you detailed internal information about Herbie.

We expect the report to grow more informative with future versions. Please get in touch if there is more information you'd like to see.