x + \frac{y \cdot \left(z - t\right)}{a - t}\frac{z - t}{a - t} \cdot y + xdouble f(double x, double y, double z, double t, double a) {
double r26294964 = x;
double r26294965 = y;
double r26294966 = z;
double r26294967 = t;
double r26294968 = r26294966 - r26294967;
double r26294969 = r26294965 * r26294968;
double r26294970 = a;
double r26294971 = r26294970 - r26294967;
double r26294972 = r26294969 / r26294971;
double r26294973 = r26294964 + r26294972;
return r26294973;
}
double f(double x, double y, double z, double t, double a) {
double r26294974 = z;
double r26294975 = t;
double r26294976 = r26294974 - r26294975;
double r26294977 = a;
double r26294978 = r26294977 - r26294975;
double r26294979 = r26294976 / r26294978;
double r26294980 = y;
double r26294981 = r26294979 * r26294980;
double r26294982 = x;
double r26294983 = r26294981 + r26294982;
return r26294983;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 11.3 |
|---|---|
| Target | 1.2 |
| Herbie | 1.3 |
Initial program 11.3
Simplified2.8
rmApplied clear-num3.1
rmApplied *-un-lft-identity3.1
Applied add-cube-cbrt3.5
Applied times-frac3.5
Applied associate-/r*3.3
Simplified3.3
rmApplied fma-udef3.3
Simplified1.3
Final simplification1.3
herbie shell --seed 2019165 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:herbie-target
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))