x + \frac{y \cdot \left(z - t\right)}{z - a}x + y \cdot \frac{z - t}{z - a}double f(double x, double y, double z, double t, double a) {
double r290796 = x;
double r290797 = y;
double r290798 = z;
double r290799 = t;
double r290800 = r290798 - r290799;
double r290801 = r290797 * r290800;
double r290802 = a;
double r290803 = r290798 - r290802;
double r290804 = r290801 / r290803;
double r290805 = r290796 + r290804;
return r290805;
}
double f(double x, double y, double z, double t, double a) {
double r290806 = x;
double r290807 = y;
double r290808 = z;
double r290809 = t;
double r290810 = r290808 - r290809;
double r290811 = a;
double r290812 = r290808 - r290811;
double r290813 = r290810 / r290812;
double r290814 = r290807 * r290813;
double r290815 = r290806 + r290814;
return r290815;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 10.4 |
|---|---|
| Target | 1.4 |
| Herbie | 1.4 |
Initial program 10.4
Simplified3.0
rmApplied clear-num3.2
rmApplied fma-udef3.2
Simplified2.9
rmApplied *-un-lft-identity2.9
Applied *-un-lft-identity2.9
Applied times-frac2.9
Applied *-un-lft-identity2.9
Applied times-frac2.9
Simplified2.9
Simplified1.4
Final simplification1.4
herbie shell --seed 2019325 +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))))