x + \frac{y \cdot \left(z - t\right)}{a - t}\mathsf{fma}\left(\frac{z - t}{\frac{a - t}{1}}, y, x\right)double code(double x, double y, double z, double t, double a) {
return ((double) (x + ((double) (((double) (y * ((double) (z - t)))) / ((double) (a - t))))));
}
double code(double x, double y, double z, double t, double a) {
return ((double) fma(((double) (((double) (z - t)) / ((double) (((double) (a - t)) / 1.0)))), y, x));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 10.5 |
|---|---|
| Target | 1.3 |
| Herbie | 1.3 |
Initial program 10.5
Simplified3.0
rmApplied *-un-lft-identity3.0
Applied add-cube-cbrt3.4
Applied times-frac3.4
Simplified3.4
rmApplied fma-udef3.4
Simplified2.9
rmApplied *-un-lft-identity2.9
Applied associate-/r*2.9
Applied associate-/r/1.3
Applied fma-def1.3
Final simplification1.3
herbie shell --seed 2020113 +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))))