Common Warnings and Errors

Herbie issues a variety of warnings and errors when something unexpected happens during compilation.

Common warnings

N% of points produce a very large (infinite) output.

Sometimes, an input to your expression produces an output so large that it's best represented by a floating-point infinity. For example, (exp 1000) is over 10434, so it's much larger than the largest floating-point value. Herbie raises this warning when too many inputs (more than 20% of them) are this large. When you see this warning, you should usually set a more restrictive precondition.

Could not determine a ground truth

Herbie raises this warning when some inputs require more than 10,000 bits to compute an exact ground truth. For example, to compute (/ (exp x) (exp x)) for x = 1e100, absurdly large numbers would be required. Herbie discards these inputs and raises this warning. When you see this warning, you should usually set a more restrictive precondition.

Could not uniquely print val

Herbie will raise this warning when it needs more than 10,000 bits to produce a unique decimal representation for a given value. This is likely the result of a bug in a custom platform, likely in a representation definition. The platform needs to be fixed.

Unused variable var

The input FPCore contains a variable that is not used in the body expression. You should remove the unused variable.

Unusual variable var

The input expression contains a variable that is named similar to some named constant, like e instead of E. You should use a different variable name.

Common errors

Invalid syntax

This error means you mis-formatted Herbie's input. Common errors include misspelled function names and parenthesized expressions that should not be parenthesized. For example, in (- (exp (x)) 1), the expression x is a variable so shouldn't be parenthesized; (- (exp x) 1) is correct. Follow the input format more carefully.

Cannot sample enough valid points

This error occurs when Herbie is unable to find enough valid points. For example, the expression (acos (+ 1000 x)) is invalid unless (<= -1001 x -999), a rather narrow range. You can specify a more restrictive precondition or pass a larger value for the --num-analysis flag.

No valid values

This error indicates that your input has no valid inputs, usually due to an overly restriction precondition. For example, the precondition (< 3 x 2) excludes all inputs. You should fix either the precondition or the input program.