x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z - t\right)}{a - t} \le -4.6031461348619199 \cdot 10^{250}:\\
\;\;\;\;x + \frac{y}{a - t} \cdot \left(z - t\right)\\
\mathbf{elif}\;\frac{y \cdot \left(z - t\right)}{a - t} \le 1.4694898840348096 \cdot 10^{269}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a - t}\\
\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 (x + ((y * (z - t)) / (a - t)));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if ((((y * (z - t)) / (a - t)) <= -4.60314613486192e+250)) {
VAR = (x + ((y / (a - t)) * (z - t)));
} else {
double VAR_1;
if ((((y * (z - t)) / (a - t)) <= 1.4694898840348096e+269)) {
VAR_1 = (x + ((y * (z - t)) / (a - t)));
} else {
VAR_1 = (x + (y * ((z - t) / (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.2 |
| Herbie | 0.5 |
if (/ (* y (- z t)) (- a t)) < -4.60314613486192e+250Initial program 54.1
rmApplied associate-/l*1.8
rmApplied associate-/r/2.4
if -4.60314613486192e+250 < (/ (* y (- z t)) (- a t)) < 1.4694898840348096e+269Initial program 0.2
if 1.4694898840348096e+269 < (/ (* y (- z t)) (- a t)) Initial program 57.3
rmApplied *-un-lft-identity57.3
Applied times-frac0.9
Simplified0.9
Final simplification0.5
herbie shell --seed 2020075
(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))))