\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}\frac{x}{y} + \left(\left(2 \cdot \frac{1}{t} - 2\right) + \frac{2}{t \cdot z}\right)double code(double x, double y, double z, double t) {
return ((x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z)));
}
double code(double x, double y, double z, double t) {
return ((x / y) + (((2.0 * (1.0 / t)) - 2.0) + (2.0 / (t * z))));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 9.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 9.1
Taylor expanded around 0 0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2020078
(FPCore (x y z t)
:name "Data.HashTable.ST.Basic:computeOverhead from hashtables-1.2.0.2"
:precision binary64
:herbie-target
(- (/ (+ (/ 2 z) 2) t) (- 2 (/ x y)))
(+ (/ x y) (/ (+ 2 (* (* z 2) (- 1 t))) (* t z))))