\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}
\frac{x}{y} + \left(-2 - \left(-2 + \frac{-2}{z}\right) \cdot \frac{1}{t}\right)
(FPCore (x y z t) :precision binary64 (+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))
(FPCore (x y z t) :precision binary64 (+ (/ x y) (- -2.0 (* (+ -2.0 (/ -2.0 z)) (/ 1.0 t)))))
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 - ((-2.0 + (-2.0 / z)) * (1.0 / t)));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 8.2 |
|---|---|
| Target | 0.5 |
| Herbie | 0.5 |
Initial program 8.2
Simplified0.5
Applied div-inv_binary640.5
Final simplification0.5
herbie shell --seed 2022088
(FPCore (x y z t)
:name "Data.HashTable.ST.Basic:computeOverhead from hashtables-1.2.0.2"
:precision binary64
:herbie-target
(- (/ (+ (/ 2.0 z) 2.0) t) (- 2.0 (/ x y)))
(+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))