x + y \cdot \frac{z - t}{z - a}\begin{array}{l}
\mathbf{if}\;y \leq -6.977935169847292 \cdot 10^{-119} \lor \neg \left(y \leq 5.431832840092546 \cdot 10^{-53}\right):\\
\;\;\;\;x + y \cdot \left(\frac{z}{z - a} - \frac{t}{z - a}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{z - a}\\
\end{array}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 VAR;
if (((y <= -6.977935169847292e-119) || !(y <= 5.431832840092546e-53))) {
VAR = ((double) (x + ((double) (y * ((double) ((z / ((double) (z - a))) - (t / ((double) (z - a)))))))));
} else {
VAR = ((double) (x + ((double) (((double) (y * ((double) (z - t)))) * (1.0 / ((double) (z - a)))))));
}
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 | 1.3 |
| Herbie | 0.6 |
if y < -6.9779351698472916e-119 or 5.43183284009254583e-53 < y Initial program Error: 0.7 bits
rmApplied div-subError: 0.7 bits
if -6.9779351698472916e-119 < y < 5.43183284009254583e-53Initial program Error: 2.3 bits
rmApplied div-invError: 2.4 bits
Applied associate-*r*Error: 0.4 bits
Final simplificationError: 0.6 bits
herbie shell --seed 2020200
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (* y (/ (- z t) (- z a)))))