x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;y \leq -3.712470684381313 \cdot 10^{-56} \lor \neg \left(y \leq 6.017694748396223 \cdot 10^{-52}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{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 -3.712470684381313e-56) (not (<= y 6.017694748396223e-52))) (+ x (* y (/ (- z t) (- a t)))) (+ x (/ (* y (- z 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 <= -3.712470684381313e-56) || !(y <= 6.017694748396223e-52))) {
tmp = ((double) (x + ((double) (y * (((double) (z - t)) / ((double) (a - t)))))));
} else {
tmp = ((double) (x + (((double) (y * ((double) (z - 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.3 |
|---|---|
| Target | 1.3 |
| Herbie | 0.4 |
if y < -3.71247068438131292e-56 or 6.01769474839622299e-52 < y Initial program Error: 18.4 bits
SimplifiedError: 0.4 bits
if -3.71247068438131292e-56 < y < 6.01769474839622299e-52Initial program Error: 0.4 bits
Final simplificationError: 0.4 bits
herbie shell --seed 2020203
(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))))