x + \left(y - x\right) \cdot \frac{z}{t}\begin{array}{l}
\mathbf{if}\;t \le 4.17324296065471216 \cdot 10^{-278}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z}{t}\\
\mathbf{elif}\;t \le 9.91229426843646807 \cdot 10^{-56}:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{\frac{t}{y}} - \frac{x}{\frac{t}{z}}\right)\\
\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 ((t <= 4.173242960654712e-278)) {
VAR = ((double) (x + ((double) (((double) (y - x)) * ((double) (z / t))))));
} else {
double VAR_1;
if ((t <= 9.912294268436468e-56)) {
VAR_1 = ((double) (x + ((double) (((double) (((double) (y - x)) * z)) / t))));
} else {
VAR_1 = ((double) (x + ((double) (((double) (z / ((double) (t / y)))) - ((double) (x / ((double) (t / z))))))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 1.9 |
|---|---|
| Target | 2.1 |
| Herbie | 1.5 |
if t < 4.17324296065471216e-278Initial program 1.9
if 4.17324296065471216e-278 < t < 9.91229426843646807e-56Initial program 4.1
rmApplied associate-*r/1.9
if 9.91229426843646807e-56 < t Initial program 1.0
rmApplied add-cube-cbrt1.4
Applied *-un-lft-identity1.4
Applied times-frac1.4
Applied associate-*r*1.3
Simplified1.3
rmApplied add-cube-cbrt1.3
Applied cbrt-prod1.3
Applied add-cube-cbrt1.4
Applied times-frac1.4
Applied associate-*r*1.3
Simplified1.3
Taylor expanded around 0 9.0
Simplified0.8
Final simplification1.5
herbie shell --seed 2020184
(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.8867) (+ 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))))