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 r611934 = x;
double r611935 = y;
double r611936 = z;
double r611937 = t;
double r611938 = r611936 - r611937;
double r611939 = r611935 * r611938;
double r611940 = a;
double r611941 = r611936 - r611940;
double r611942 = r611939 / r611941;
double r611943 = r611934 + r611942;
return r611943;
}
double f(double x, double y, double z, double t, double a) {
double r611944 = x;
double r611945 = y;
double r611946 = z;
double r611947 = t;
double r611948 = r611946 - r611947;
double r611949 = a;
double r611950 = r611946 - r611949;
double r611951 = r611948 / r611950;
double r611952 = r611945 * r611951;
double r611953 = r611944 + r611952;
return r611953;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 10.9 |
|---|---|
| Target | 1.2 |
| Herbie | 1.3 |
Initial program 10.9
Simplified2.9
rmApplied clear-num3.1
rmApplied fma-udef3.1
Simplified3.0
rmApplied *-un-lft-identity3.0
Applied *-un-lft-identity3.0
Applied times-frac3.0
Applied *-un-lft-identity3.0
Applied times-frac3.0
Simplified3.0
Simplified1.3
Final simplification1.3
herbie shell --seed 2020047 +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))))