x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z - t\right)}{a - t} \le -6.77757148623794926 \cdot 10^{195}:\\
\;\;\;\;\left(\frac{z}{\frac{a - t}{y}} - \frac{t}{\frac{a - t}{y}}\right) + x\\
\mathbf{elif}\;\frac{y \cdot \left(z - t\right)}{a - t} \le 3.33962653386183323 \cdot 10^{197}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a - t}, z - t, x\right)\\
\end{array}double code(double x, double y, double z, double t, double a) {
return (x + ((y * (z - t)) / (a - t)));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if ((((y * (z - t)) / (a - t)) <= -6.777571486237949e+195)) {
VAR = (((z / ((a - t) / y)) - (t / ((a - t) / y))) + x);
} else {
double VAR_1;
if ((((y * (z - t)) / (a - t)) <= 3.339626533861833e+197)) {
VAR_1 = (x + ((y * (z - t)) / (a - t)));
} else {
VAR_1 = fma((y / (a - t)), (z - t), x);
}
VAR = VAR_1;
}
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.8 |
|---|---|
| Target | 1.3 |
| Herbie | 1.0 |
if (/ (* y (- z t)) (- a t)) < -6.777571486237949e+195Initial program 45.1
Simplified4.7
rmApplied clear-num4.8
rmApplied fma-udef4.8
Simplified4.2
rmApplied div-sub4.2
if -6.777571486237949e+195 < (/ (* y (- z t)) (- a t)) < 3.339626533861833e+197Initial program 0.2
if 3.339626533861833e+197 < (/ (* y (- z t)) (- a t)) Initial program 47.4
Simplified3.2
Final simplification1.0
herbie shell --seed 2020071 +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))))