x + \frac{y \cdot \left(z - t\right)}{z - a}y \cdot \frac{z - t}{z - a} + xdouble f(double x, double y, double z, double t, double a) {
double r562681 = x;
double r562682 = y;
double r562683 = z;
double r562684 = t;
double r562685 = r562683 - r562684;
double r562686 = r562682 * r562685;
double r562687 = a;
double r562688 = r562683 - r562687;
double r562689 = r562686 / r562688;
double r562690 = r562681 + r562689;
return r562690;
}
double f(double x, double y, double z, double t, double a) {
double r562691 = y;
double r562692 = z;
double r562693 = t;
double r562694 = r562692 - r562693;
double r562695 = a;
double r562696 = r562692 - r562695;
double r562697 = r562694 / r562696;
double r562698 = r562691 * r562697;
double r562699 = x;
double r562700 = r562698 + r562699;
return r562700;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 10.7 |
|---|---|
| Target | 1.3 |
| Herbie | 1.4 |
Initial program 10.7
Simplified2.8
rmApplied div-inv2.9
rmApplied add-cube-cbrt3.3
Applied associate-/r*3.3
rmApplied fma-udef3.3
Simplified10.7
rmApplied *-un-lft-identity10.7
Applied times-frac1.4
Simplified1.4
Final simplification1.4
herbie shell --seed 2020062 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))