\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\frac{x - \frac{x}{z \cdot t - x}}{x + 1} + \frac{\frac{y}{x + 1}}{t - \frac{x}{z}}
(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 (/ x (- (* z t) x))) (+ x 1.0)) (/ (/ y (+ x 1.0)) (- t (/ x z)))))
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 - (x / ((z * t) - x))) / (x + 1.0)) + ((y / (x + 1.0)) / (t - (x / z)));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.4 |
|---|---|
| Target | 0.4 |
| Herbie | 0.0 |
Initial program 7.4
Taylor expanded in y around 0 7.4
Simplified2.0
Applied clear-num_binary642.0
Taylor expanded in y around 0 7.4
Simplified0.0
Applied associate-/r*_binary640.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2022077
(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)))