\frac{x}{y} \cdot \left(z - t\right) + t\begin{array}{l}
\mathbf{if}\;y \le -7344105837141796900 \lor \neg \left(y \le 7.51389059790424003 \cdot 10^{111}\right):\\
\;\;\;\;\left(\sqrt[3]{\frac{x}{y} \cdot \left(z - t\right)} \cdot \sqrt[3]{\frac{x}{y} \cdot \left(z - t\right)}\right) \cdot \sqrt[3]{\frac{x}{y} \cdot \left(z - t\right)} + t\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(z - t\right)}{y} + t\\
\end{array}double code(double x, double y, double z, double t) {
return (((x / y) * (z - t)) + t);
}
double code(double x, double y, double z, double t) {
double VAR;
if (((y <= -7.344105837141797e+18) || !(y <= 7.51389059790424e+111))) {
VAR = (((cbrt(((x / y) * (z - t))) * cbrt(((x / y) * (z - t)))) * cbrt(((x / y) * (z - t)))) + t);
} else {
VAR = (((x * (z - t)) / y) + t);
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.1 |
|---|---|
| Target | 2.5 |
| Herbie | 2.0 |
if y < -7.344105837141797e+18 or 7.51389059790424e+111 < y Initial program 1.4
rmApplied add-cube-cbrt1.7
if -7.344105837141797e+18 < y < 7.51389059790424e+111Initial program 2.9
rmApplied associate-*l/2.3
Final simplification2.0
herbie shell --seed 2020105 +o rules:numerics
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cget from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(if (< z 2.759456554562692e-282) (+ (* (/ x y) (- z t)) t) (if (< z 2.326994450874436e-110) (+ (* x (/ (- z t) y)) t) (+ (* (/ x y) (- z t)) t)))
(+ (* (/ x y) (- z t)) t))