x + y \cdot \frac{z - t}{a - t}\begin{array}{l}
\mathbf{if}\;t \le -1.0071455594193599 \cdot 10^{-271} \lor \neg \left(t \le 7.46702847266602817 \cdot 10^{-71}\right):\\
\;\;\;\;x + y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\
\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 temp;
if (((t <= -1.0071455594193599e-271) || !(t <= 7.467028472666028e-71))) {
temp = (x + (y * ((z / (a - t)) - (t / (a - t)))));
} else {
temp = (x + ((y * (z - t)) * (1.0 / (a - t))));
}
return temp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 1.4 |
|---|---|
| Target | 0.5 |
| Herbie | 1.5 |
if t < -1.0071455594193599e-271 or 7.467028472666028e-71 < t Initial program 0.9
rmApplied div-sub0.8
if -1.0071455594193599e-271 < t < 7.467028472666028e-71Initial program 3.5
rmApplied div-inv3.5
Applied associate-*r*3.9
Final simplification1.5
herbie shell --seed 2020056 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< y -8.508084860551241e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.894426862792089e-49) (+ x (* (* y (- z t)) (/ 1 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))
(+ x (* y (/ (- z t) (- a t)))))