x + y \cdot \frac{z - t}{a - t}\begin{array}{l}
\mathbf{if}\;\frac{z - t}{a - t} \le -5.50508004782713098 \cdot 10^{143}:\\
\;\;\;\;x + \frac{1}{\frac{a - t}{\left(z - t\right) \cdot y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{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 ((((z - t) / (a - t)) <= -5.505080047827131e+143)) {
VAR = (x + (1.0 / ((a - t) / ((z - t) * y))));
} 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.3 |
|---|---|
| Target | 0.4 |
| Herbie | 0.9 |
if (/ (- z t) (- a t)) < -5.505080047827131e+143Initial program 11.9
rmApplied div-inv11.9
rmApplied un-div-inv11.9
Applied associate-*r/3.1
Simplified3.1
rmApplied clear-num3.1
if -5.505080047827131e+143 < (/ (- z t) (- a t)) Initial program 0.8
Final simplification0.9
herbie shell --seed 2020075
(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)))))