\frac{x}{y} \cdot \left(z - t\right) + t\begin{array}{l}
\mathbf{if}\;y \le -1.667370803916951 \cdot 10^{-57}:\\
\;\;\;\;\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{1} \cdot \left(\frac{\sqrt[3]{x}}{y} \cdot \left(z - t\right)\right) + t\\
\mathbf{elif}\;y \le 5.60375416897479671 \cdot 10^{-28}:\\
\;\;\;\;\frac{x \cdot \left(z - t\right)}{y} + t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z - t}{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 temp;
if ((y <= -1.667370803916951e-57)) {
temp = ((((cbrt(x) * cbrt(x)) / 1.0) * ((cbrt(x) / y) * (z - t))) + t);
} else {
double temp_1;
if ((y <= 5.603754168974797e-28)) {
temp_1 = (((x * (z - t)) / y) + t);
} else {
temp_1 = ((x * ((z - t) / y)) + t);
}
temp = temp_1;
}
return temp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.0 |
|---|---|
| Target | 2.3 |
| Herbie | 1.5 |
if y < -1.667370803916951e-57Initial program 1.1
rmApplied *-un-lft-identity1.1
Applied add-cube-cbrt1.6
Applied times-frac1.6
Applied associate-*l*1.2
if -1.667370803916951e-57 < y < 5.603754168974797e-28Initial program 3.9
rmApplied associate-*l/2.3
if 5.603754168974797e-28 < y Initial program 1.2
rmApplied div-inv1.2
Applied associate-*l*1.0
Simplified1.0
Final simplification1.5
herbie shell --seed 2020053
(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))