x + \frac{y \cdot \left(z - t\right)}{a - t}\mathsf{fma}\left(\frac{z - t}{a - t}, y, x\right)double f(double x, double y, double z, double t, double a) {
double r512693 = x;
double r512694 = y;
double r512695 = z;
double r512696 = t;
double r512697 = r512695 - r512696;
double r512698 = r512694 * r512697;
double r512699 = a;
double r512700 = r512699 - r512696;
double r512701 = r512698 / r512700;
double r512702 = r512693 + r512701;
return r512702;
}
double f(double x, double y, double z, double t, double a) {
double r512703 = z;
double r512704 = t;
double r512705 = r512703 - r512704;
double r512706 = a;
double r512707 = r512706 - r512704;
double r512708 = r512705 / r512707;
double r512709 = y;
double r512710 = x;
double r512711 = fma(r512708, r512709, r512710);
return r512711;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 11.0 |
|---|---|
| Target | 1.3 |
| Herbie | 1.4 |
Initial program 11.0
Simplified2.9
rmApplied *-un-lft-identity2.9
Applied add-cube-cbrt3.4
Applied times-frac3.4
Simplified3.4
rmApplied fma-udef3.4
Simplified3.0
rmApplied *-un-lft-identity3.0
Applied *-un-lft-identity3.0
Applied distribute-lft-out3.0
Simplified1.4
Final simplification1.4
herbie shell --seed 2020039 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))