\frac{x}{x \cdot x + 1}\frac{1}{x + \frac{1}{x}}(FPCore (x) :precision binary64 (/ x (+ (* x x) 1.0)))
(FPCore (x) :precision binary64 (/ 1.0 (+ x (/ 1.0 x))))
double code(double x) {
return (x / ((double) (((double) (x * x)) + 1.0)));
}
double code(double x) {
return (1.0 / ((double) (x + (1.0 / x))));
}




Bits error versus x
Results
| Original | 14.8 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 14.8
rmApplied clear-num_binary6414.9
Taylor expanded around 0 0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2020210
(FPCore (x)
:name "x / (x^2 + 1)"
:precision binary64
:herbie-target
(/ 1.0 (+ x (/ 1.0 x)))
(/ x (+ (* x x) 1.0)))