x + y \cdot \frac{z - t}{a - t}\begin{array}{l}
\mathbf{if}\;t \le -3.3050585222382704 \cdot 10^{-124} \lor \neg \left(t \le 7.2979868695563967 \cdot 10^{-146}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{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 VAR;
if (((t <= -3.3050585222382704e-124) || !(t <= 7.297986869556397e-146))) {
VAR = (x + (y * ((z - t) / (a - t))));
} else {
VAR = (x + ((y * (z - t)) / (a - t)));
}
return VAR;
}




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 < -3.3050585222382704e-124 or 7.297986869556397e-146 < t Initial program 0.7
if -3.3050585222382704e-124 < t < 7.297986869556397e-146Initial program 3.4
rmApplied clear-num3.5
Applied un-div-inv3.3
rmApplied div-inv3.3
rmApplied *-commutative3.3
Applied associate-/r*3.7
Simplified3.7
Final simplification1.5
herbie shell --seed 2020078
(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)))))