x + \frac{y \cdot \left(z - t\right)}{z - a}\frac{\frac{z - t}{z - a}}{\frac{1}{y}} + xdouble f(double x, double y, double z, double t, double a) {
double r559759 = x;
double r559760 = y;
double r559761 = z;
double r559762 = t;
double r559763 = r559761 - r559762;
double r559764 = r559760 * r559763;
double r559765 = a;
double r559766 = r559761 - r559765;
double r559767 = r559764 / r559766;
double r559768 = r559759 + r559767;
return r559768;
}
double f(double x, double y, double z, double t, double a) {
double r559769 = z;
double r559770 = t;
double r559771 = r559769 - r559770;
double r559772 = a;
double r559773 = r559769 - r559772;
double r559774 = r559771 / r559773;
double r559775 = 1.0;
double r559776 = y;
double r559777 = r559775 / r559776;
double r559778 = r559774 / r559777;
double r559779 = x;
double r559780 = r559778 + r559779;
return r559780;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 11.7 |
|---|---|
| Target | 1.3 |
| Herbie | 1.4 |
Initial program 11.7
Simplified2.7
rmApplied add-cube-cbrt3.2
Applied associate-/r*3.2
rmApplied fma-udef3.2
Simplified2.8
rmApplied div-inv2.8
Applied associate-/r*1.4
Final simplification1.4
herbie shell --seed 2019353 +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))))