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




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.0 |
|---|---|
| Target | 2.4 |
| Herbie | 1.8 |
if t < -5.02125602827297452e-157 or 1.9912695390203027e-120 < t Initial program Error: 0.8 bits
if -5.02125602827297452e-157 < t < 1.9912695390203027e-120Initial program Error: 4.9 bits
rmApplied *-un-lft-identityError: 4.9 bits
Applied add-cube-cbrtError: 5.6 bits
Applied times-fracError: 5.6 bits
Applied associate-*l*Error: 4.2 bits
SimplifiedError: 4.2 bits
Final simplificationError: 1.8 bits
herbie shell --seed 2020203
(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))