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




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.4 |
|---|---|
| Target | 2.0 |
| Herbie | 1.2 |
if y < -8.40110621734801283e123 or 6.47296858187017912e-154 < y Initial program 12.1
rmApplied *-un-lft-identity_binary6412.1
Applied times-frac_binary643.3
Simplified3.3
rmApplied add-cube-cbrt_binary644.0
Applied add-cube-cbrt_binary644.2
Applied times-frac_binary644.2
Applied associate-*r*_binary641.2
if -8.40110621734801283e123 < y < 6.47296858187017912e-154Initial program 2.2
rmApplied *-un-lft-identity_binary642.2
Applied times-frac_binary648.4
Simplified8.4
rmApplied div-inv_binary648.4
Applied associate-*r*_binary642.2
Simplified2.2
rmApplied associate-*l*_binary641.3
Simplified1.3
Final simplification1.2
herbie shell --seed 2021118
(FPCore (x y z t)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D"
:precision binary64
:herbie-target
(- x (+ (* x (/ y t)) (* (- z) (/ y t))))
(+ x (/ (* y (- z x)) t)))