x + y \cdot \frac{z - t}{a - t}\begin{array}{l}
\mathbf{if}\;y \leq -6.583074756991604 \cdot 10^{-103}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\mathbf{elif}\;y \leq 2.408267500581704 \cdot 10^{-224}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z - t}}\\
\end{array}(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
(FPCore (x y z t a)
:precision binary64
(if (<= y -6.583074756991604e-103)
(+ x (* y (/ (- z t) (- a t))))
(if (<= y 2.408267500581704e-224)
(+ x (* (* y (- z t)) (/ 1.0 (- a t))))
(+ x (/ y (/ (- a t) (- z t)))))))double code(double x, double y, double z, double t, double a) {
return ((double) (x + ((double) (y * (((double) (z - t)) / ((double) (a - t)))))));
}
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -6.583074756991604e-103)) {
tmp = ((double) (x + ((double) (y * (((double) (z - t)) / ((double) (a - t)))))));
} else {
double tmp_1;
if ((y <= 2.408267500581704e-224)) {
tmp_1 = ((double) (x + ((double) (((double) (y * ((double) (z - t)))) * (1.0 / ((double) (a - t)))))));
} else {
tmp_1 = ((double) (x + (y / (((double) (a - t)) / ((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 | 1.4 |
|---|---|
| Target | 0.4 |
| Herbie | 0.7 |
if y < -6.583074756991604e-103Initial program 0.6
if -6.583074756991604e-103 < y < 2.40826750058170389e-224Initial program 3.1
rmApplied div-inv_binary643.1
Applied associate-*r*_binary640.4
if 2.40826750058170389e-224 < y Initial program 0.9
rmApplied associate-*r/_binary6412.0
rmApplied associate-/l*_binary640.9
Final simplification0.7
herbie shell --seed 2020210
(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.0 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))
(+ x (* y (/ (- z t) (- a t)))))