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




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.8 |
|---|---|
| Target | 0.3 |
| Herbie | 0.3 |
Initial program 7.8
rmApplied div-sub_binary647.8
Applied associate-+r-_binary647.8
Applied div-sub_binary647.8
Simplified7.8
Simplified7.8
rmApplied associate-/l*_binary642.3
rmApplied div-sub_binary642.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2020231
(FPCore (x y z t)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, A"
:precision binary64
:herbie-target
(/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0))
(/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))