x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z - t\right)}{a - t} \leq -3.886810370241773 \cdot 10^{+306}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z - t}}\\
\mathbf{elif}\;\frac{y \cdot \left(z - t\right)}{a - t} \leq 5.5747667159888895 \cdot 10^{+286}:\\
\;\;\;\;\frac{y \cdot \left(z - t\right)}{a - t} + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\end{array}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 VAR;
if (((((double) (y * ((double) (z - t)))) / ((double) (a - t))) <= -3.886810370241773e+306)) {
VAR = ((double) (x + (y / (((double) (a - t)) / ((double) (z - t))))));
} else {
double VAR_1;
if (((((double) (y * ((double) (z - t)))) / ((double) (a - t))) <= 5.5747667159888895e+286)) {
VAR_1 = ((double) ((((double) (y * ((double) (z - t)))) / ((double) (a - t))) + x));
} else {
VAR_1 = ((double) (x + ((double) (y * (((double) (z - t)) / ((double) (a - t)))))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 10.7 |
|---|---|
| Target | 1.3 |
| Herbie | 0.3 |
if (/ (* y (- z t)) (- a t)) < -3.886810370241773e306Initial program 63.7
rmApplied associate-/l*0.1
if -3.886810370241773e306 < (/ (* y (- z t)) (- a t)) < 5.57476671598888951e286Initial program 0.2
if 5.57476671598888951e286 < (/ (* y (- z t)) (- a t)) Initial program 60.2
Simplified0.8
Final simplification0.3
herbie shell --seed 2020199
(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))))