x + \frac{y \cdot \left(z - t\right)}{z - a}\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z - t\right)}{z - a} = -\infty \lor \neg \left(\frac{y \cdot \left(z - t\right)}{z - a} \le 4.1106340762642846 \cdot 10^{302}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z - a}, z - t, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z - a}\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((double) (x + ((double) (((double) (y * ((double) (z - t)))) / ((double) (z - a))))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((((double) (((double) (y * ((double) (z - t)))) / ((double) (z - a)))) <= -inf.0) || !(((double) (((double) (y * ((double) (z - t)))) / ((double) (z - a)))) <= 4.110634076264285e+302))) {
VAR = ((double) fma(((double) (y / ((double) (z - a)))), ((double) (z - t)), x));
} else {
VAR = ((double) (x + ((double) (((double) (y * ((double) (z - t)))) / ((double) (z - a))))));
}
return VAR;
}




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.2 |
| Herbie | 0.2 |
if (/ (* y (- z t)) (- z a)) < -inf.0 or 4.110634076264285e+302 < (/ (* y (- z t)) (- z a)) Initial program 63.7
Simplified0.3
rmApplied clear-num0.4
rmApplied clear-num0.3
Applied remove-double-div0.3
if -inf.0 < (/ (* y (- z t)) (- z a)) < 4.110634076264285e+302Initial program 0.2
Final simplification0.2
herbie shell --seed 2020114 +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))))