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 r522619 = x;
double r522620 = y;
double r522621 = z;
double r522622 = t;
double r522623 = r522621 - r522622;
double r522624 = r522620 * r522623;
double r522625 = a;
double r522626 = r522621 - r522625;
double r522627 = r522624 / r522626;
double r522628 = r522619 + r522627;
return r522628;
}
double f(double x, double y, double z, double t, double a) {
double r522629 = y;
double r522630 = z;
double r522631 = t;
double r522632 = r522630 - r522631;
double r522633 = a;
double r522634 = r522630 - r522633;
double r522635 = r522632 / r522634;
double r522636 = r522629 * r522635;
double r522637 = x;
double r522638 = r522636 + r522637;
return r522638;
}




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))))