x + \frac{\left(y - z\right) \cdot t}{a - z}\begin{array}{l}
\mathbf{if}\;x + \frac{\left(y - z\right) \cdot t}{a - z} \le 3.33043009511256227 \cdot 10^{-175}:\\
\;\;\;\;x + \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{t}}\\
\mathbf{elif}\;x + \frac{\left(y - z\right) \cdot t}{a - z} \le 1.65381565469013311 \cdot 10^{288}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((double) (x + ((double) (((double) (((double) (y - z)) * t)) / ((double) (a - z))))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if ((((double) (x + ((double) (((double) (((double) (y - z)) * t)) / ((double) (a - z)))))) <= 3.330430095112562e-175)) {
VAR = ((double) (x + ((double) (((double) (((double) (y - z)) / ((double) (a - z)))) * ((double) (1.0 / ((double) (1.0 / t))))))));
} else {
double VAR_1;
if ((((double) (x + ((double) (((double) (((double) (y - z)) * t)) / ((double) (a - z)))))) <= 1.653815654690133e+288)) {
VAR_1 = ((double) (x + ((double) (((double) (((double) (y - z)) * t)) / ((double) (a - z))))));
} else {
VAR_1 = ((double) (x + ((double) (((double) (y - z)) * ((double) (t / ((double) (a - z))))))));
}
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 | 11.3 |
|---|---|
| Target | 0.6 |
| Herbie | 0.9 |
if (+ x (/ (* (- y z) t) (- a z))) < 3.33043009511256227e-175Initial program 10.9
Simplified3.5
rmApplied clear-num3.8
rmApplied div-inv3.8
Applied *-un-lft-identity3.8
Applied times-frac3.6
Applied associate-*r*1.3
Simplified1.3
if 3.33043009511256227e-175 < (+ x (/ (* (- y z) t) (- a z))) < 1.65381565469013311e288Initial program 0.1
if 1.65381565469013311e288 < (+ x (/ (* (- y z) t) (- a z))) Initial program 53.0
Simplified1.5
Final simplification0.9
herbie shell --seed 2020184
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(if (< t -1.0682974490174067e-39) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t))))
(+ x (/ (* (- y z) t) (- a z))))