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 r21519665 = x;
double r21519666 = y;
double r21519667 = z;
double r21519668 = t;
double r21519669 = r21519667 - r21519668;
double r21519670 = r21519666 * r21519669;
double r21519671 = a;
double r21519672 = r21519671 - r21519668;
double r21519673 = r21519670 / r21519672;
double r21519674 = r21519665 + r21519673;
return r21519674;
}
double f(double x, double y, double z, double t, double a) {
double r21519675 = z;
double r21519676 = t;
double r21519677 = r21519675 - r21519676;
double r21519678 = a;
double r21519679 = r21519678 - r21519676;
double r21519680 = r21519677 / r21519679;
double r21519681 = y;
double r21519682 = r21519680 * r21519681;
double r21519683 = x;
double r21519684 = r21519682 + r21519683;
return r21519684;
}




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
Simplified3.0
rmApplied add-cube-cbrt3.5
Applied associate-/l*3.5
rmApplied fma-udef3.5
Simplified3.0
rmApplied associate-/r/1.3
Final simplification1.3
herbie shell --seed 2019168 +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))))