x + \left(y - x\right) \cdot \frac{z}{t}\begin{array}{l}
\mathbf{if}\;z \le 3.6000243022547191 \cdot 10^{-81}:\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\
\mathbf{elif}\;z \le 3.3315843616580257 \cdot 10^{269}:\\
\;\;\;\;x + \frac{y - x}{t} \cdot z\\
\mathbf{else}:\\
\;\;\;\;x + \left(\sqrt{z} \cdot \left(y - x\right)\right) \cdot \frac{\sqrt{z}}{t}\\
\end{array}double code(double x, double y, double z, double t) {
return ((double) (x + ((double) (((double) (y - x)) * ((double) (z / t))))));
}
double code(double x, double y, double z, double t) {
double VAR;
if ((z <= 3.600024302254719e-81)) {
VAR = ((double) (x + ((double) (((double) (y - x)) / ((double) (t / z))))));
} else {
double VAR_1;
if ((z <= 3.331584361658026e+269)) {
VAR_1 = ((double) (x + ((double) (((double) (((double) (y - x)) / t)) * z))));
} else {
VAR_1 = ((double) (x + ((double) (((double) (((double) sqrt(z)) * ((double) (y - x)))) * ((double) (((double) sqrt(z)) / t))))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.3 |
|---|---|
| Target | 2.4 |
| Herbie | 2.1 |
if z < 3.600024302254719e-81Initial program 1.9
rmApplied associate-*r/5.0
rmApplied associate-/l*1.9
if 3.600024302254719e-81 < z < 3.331584361658026e+269Initial program 2.9
rmApplied associate-*r/9.5
rmApplied associate-/l*2.6
rmApplied associate-/r/2.0
if 3.331584361658026e+269 < z Initial program 6.5
rmApplied *-un-lft-identity6.5
Applied add-sqr-sqrt6.8
Applied times-frac6.8
Applied associate-*r*14.1
Simplified14.1
Final simplification2.1
herbie shell --seed 2020123
(FPCore (x y z t)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:tickPosition from plot-0.2.3.4"
:precision binary64
:herbie-target
(if (< (* (- y x) (/ z t)) -1013646692435.887) (+ x (/ (- y x) (/ t z))) (if (< (* (- y x) (/ z t)) -0.0) (+ x (/ (* (- y x) z) t)) (+ x (/ (- y x) (/ t z)))))
(+ x (* (- y x) (/ z t))))