x + \frac{y \cdot \left(z - t\right)}{z - a}\begin{array}{l}
\mathbf{if}\;y \leq -6.58956908808249 \cdot 10^{-146}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z - a}\\
\mathbf{elif}\;y \leq 5.259769225178744 \cdot 10^{-122}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z - t}}\\
\end{array}(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
(FPCore (x y z t a)
:precision binary64
(if (<= y -6.58956908808249e-146)
(+ x (* y (/ (- z t) (- z a))))
(if (<= y 5.259769225178744e-122)
(+ x (/ (* y (- z t)) (- z a)))
(+ x (/ y (/ (- z a) (- z t)))))))double code(double x, double y, double z, double t, double a) {
return ((double) (x + (((double) (y * ((double) (z - t)))) / ((double) (z - a)))));
}
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -6.58956908808249e-146)) {
tmp = ((double) (x + ((double) (y * (((double) (z - t)) / ((double) (z - a)))))));
} else {
double tmp_1;
if ((y <= 5.259769225178744e-122)) {
tmp_1 = ((double) (x + (((double) (y * ((double) (z - t)))) / ((double) (z - a)))));
} else {
tmp_1 = ((double) (x + (y / (((double) (z - a)) / ((double) (z - t))))));
}
tmp = tmp_1;
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 10.5 |
|---|---|
| Target | 1.1 |
| Herbie | 0.6 |
if y < -6.5895690880824897e-146Initial program 14.5
rmApplied *-un-lft-identity_binary6414.5
Applied times-frac_binary640.7
Simplified0.7
if -6.5895690880824897e-146 < y < 5.2597692251787439e-122Initial program 0.3
if 5.2597692251787439e-122 < y Initial program 15.9
rmApplied associate-/l*_binary640.7
Final simplification0.6
herbie shell --seed 2020210
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))