Average Error: 14.9 → 14.9
Time: 340.0ms
Precision: binary64
Cost: 448
\[\frac{x}{x \cdot x + 1}\]
\[\frac{x}{x \cdot x + 1}\]
\frac{x}{x \cdot x + 1}
\frac{x}{x \cdot x + 1}
(FPCore (x) :precision binary64 (/ x (+ (* x x) 1.0)))
(FPCore (x) :precision binary64 (/ x (+ (* x x) 1.0)))
double code(double x) {
	return x / ((x * x) + 1.0);
}
double code(double x) {
	return x / ((x * x) + 1.0);
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original14.9
Target0.1
Herbie14.9
\[\frac{1}{x + \frac{1}{x}}\]

Derivation

  1. Initial program 14.9

    \[\frac{x}{x \cdot x + 1}\]

Reproduce

herbie shell --seed 2021042 
(FPCore (x)
  :name "x / (x^2 + 1)"
  :precision binary64

  :herbie-target
  (/ 1.0 (+ x (/ 1.0 x)))

  (/ x (+ (* x x) 1.0)))