x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;y \leq -2.4894281283083287 \cdot 10^{-39} \lor \neg \left(y \leq 1.0004809981351819 \cdot 10^{-91}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z - y \cdot t}{a - 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 (or (<= y -2.4894281283083287e-39) (not (<= y 1.0004809981351819e-91))) (+ x (* y (/ (- z t) (- a t)))) (+ x (/ (- (* y z) (* y t)) (- a 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 <= -2.4894281283083287e-39) || !(y <= 1.0004809981351819e-91))) {
tmp = ((double) (x + ((double) (y * (((double) (z - t)) / ((double) (a - t)))))));
} else {
tmp = ((double) (x + (((double) (((double) (y * z)) - ((double) (y * t)))) / ((double) (a - t)))));
}
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.9 |
|---|---|
| Target | 1.3 |
| Herbie | 0.6 |
if y < -2.48942812830832866e-39 or 1.0004809981351819e-91 < y Initial program 18.7
rmApplied *-un-lft-identity_binary6418.7
Applied times-frac_binary640.7
Simplified0.7
if -2.48942812830832866e-39 < y < 1.0004809981351819e-91Initial program 0.5
rmApplied sub-neg_binary640.5
Applied distribute-lft-in_binary640.5
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, B"
:precision binary64
:herbie-target
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))