x + \left(y - x\right) \cdot \frac{z}{t}\begin{array}{l}
\mathbf{if}\;x \leq -1.939599798124544 \cdot 10^{-207} \lor \neg \left(x \leq 1.3955342177223764 \cdot 10^{-182}\right):\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\left(y - x\right) \cdot \left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right)\right) \cdot \frac{\sqrt[3]{z}}{t}\\
\end{array}(FPCore (x y z t) :precision binary64 (+ x (* (- y x) (/ z t))))
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.939599798124544e-207) (not (<= x 1.3955342177223764e-182))) (+ x (* (- y x) (/ z t))) (+ x (* (* (- y x) (* (cbrt z) (cbrt z))) (/ (cbrt z) t)))))
double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.939599798124544e-207) || !(x <= 1.3955342177223764e-182)) {
tmp = x + ((y - x) * (z / t));
} else {
tmp = x + (((y - x) * (cbrt(z) * cbrt(z))) * (cbrt(z) / t));
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.2 |
|---|---|
| Target | 2.4 |
| Herbie | 1.7 |
if x < -1.93959979812454384e-207 or 1.39553421772237643e-182 < x Initial program 1.2
if -1.93959979812454384e-207 < x < 1.39553421772237643e-182Initial program 6.3
rmApplied *-un-lft-identity_binary646.3
Applied add-cube-cbrt_binary647.0
Applied times-frac_binary647.0
Applied associate-*r*_binary643.9
Simplified3.9
Final simplification1.7
herbie shell --seed 2020220
(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))))