x + \frac{\left(y - z\right) \cdot t}{a - z}\begin{array}{l}
\mathbf{if}\;\frac{\left(y - z\right) \cdot t}{a - z} = -\infty:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t, x\right)\\
\mathbf{elif}\;\frac{\left(y - z\right) \cdot t}{a - z} \le 1.96946429380001842 \cdot 10^{292}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\end{array}double code(double x, double y, double z, double t, double a) {
return (x + (((y - z) * t) / (a - z)));
}
double code(double x, double y, double z, double t, double a) {
double temp;
if (((((y - z) * t) / (a - z)) <= -inf.0)) {
temp = fma(((y - z) / (a - z)), t, x);
} else {
double temp_1;
if (((((y - z) * t) / (a - z)) <= 1.9694642938000184e+292)) {
temp_1 = (x + (((y - z) * t) / (a - z)));
} else {
temp_1 = (x + ((y - z) * (t / (a - z))));
}
temp = temp_1;
}
return temp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 10.2 |
|---|---|
| Target | 0.6 |
| Herbie | 0.3 |
if (/ (* (- y z) t) (- a z)) < -inf.0Initial program 64.0
Simplified0.1
if -inf.0 < (/ (* (- y z) t) (- a z)) < 1.9694642938000184e+292Initial program 0.2
if 1.9694642938000184e+292 < (/ (* (- y z) t) (- a z)) Initial program 61.8
rmApplied *-un-lft-identity61.8
Applied times-frac0.8
Simplified0.8
Final simplification0.3
herbie shell --seed 2020066 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(if (< t -1.0682974490174067e-39) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t))))
(+ x (/ (* (- y z) t) (- a z))))