x + \frac{y \cdot \left(z - x\right)}{t}\frac{z - x}{\frac{t}{y}} + xdouble f(double x, double y, double z, double t) {
double r323541 = x;
double r323542 = y;
double r323543 = z;
double r323544 = r323543 - r323541;
double r323545 = r323542 * r323544;
double r323546 = t;
double r323547 = r323545 / r323546;
double r323548 = r323541 + r323547;
return r323548;
}
double f(double x, double y, double z, double t) {
double r323549 = z;
double r323550 = x;
double r323551 = r323549 - r323550;
double r323552 = t;
double r323553 = y;
double r323554 = r323552 / r323553;
double r323555 = r323551 / r323554;
double r323556 = r323555 + r323550;
return r323556;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.4 |
|---|---|
| Target | 2.1 |
| Herbie | 1.9 |
Initial program 6.4
rmApplied clear-num6.4
rmApplied associate-/r*2.0
rmApplied *-un-lft-identity2.0
Applied *-un-lft-identity2.0
Applied *-un-lft-identity2.0
Applied times-frac2.0
Applied times-frac2.0
Applied add-cube-cbrt2.0
Applied times-frac2.0
Simplified2.0
Simplified1.9
Final simplification1.9
herbie shell --seed 2020025
(FPCore (x y z t)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D"
:precision binary64
:herbie-target
(- x (+ (* x (/ y t)) (* (- z) (/ y t))))
(+ x (/ (* y (- z x)) t)))