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 r512245 = x;
double r512246 = y;
double r512247 = z;
double r512248 = t;
double r512249 = r512247 - r512248;
double r512250 = r512246 * r512249;
double r512251 = a;
double r512252 = r512251 - r512248;
double r512253 = r512250 / r512252;
double r512254 = r512245 + r512253;
return r512254;
}
double f(double x, double y, double z, double t, double a) {
double r512255 = z;
double r512256 = t;
double r512257 = r512255 - r512256;
double r512258 = a;
double r512259 = r512258 - r512256;
double r512260 = r512257 / r512259;
double r512261 = y;
double r512262 = x;
double r512263 = fma(r512260, r512261, r512262);
return r512263;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 10.7 |
|---|---|
| Target | 1.2 |
| Herbie | 1.3 |
Initial program 10.7
Simplified3.0
rmApplied clear-num3.2
rmApplied fma-udef3.2
Simplified2.9
rmApplied *-un-lft-identity2.9
Applied *-un-lft-identity2.9
Applied distribute-lft-out2.9
Simplified1.3
Final simplification1.3
herbie shell --seed 2020033 +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))))