\frac{x}{y} \cdot \left(z - t\right) + t\begin{array}{l}
\mathbf{if}\;x \le -3.4993447625500852 \cdot 10^{-108} \lor \neg \left(x \le 3.53103351840085323 \cdot 10^{-74}\right):\\
\;\;\;\;x \cdot \frac{z - t}{y} + t\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sqrt[3]{y} \cdot \sqrt[3]{y}} \cdot \left(\frac{x}{\sqrt[3]{y}} \cdot \left(z - t\right)\right) + t\\
\end{array}double code(double x, double y, double z, double t) {
return ((double) (((double) (((double) (x / y)) * ((double) (z - t)))) + t));
}
double code(double x, double y, double z, double t) {
double VAR;
if (((x <= -3.499344762550085e-108) || !(x <= 3.5310335184008532e-74))) {
VAR = ((double) (((double) (x * ((double) (((double) (z - t)) / y)))) + t));
} else {
VAR = ((double) (((double) (((double) (1.0 / ((double) (((double) cbrt(y)) * ((double) cbrt(y)))))) * ((double) (((double) (x / ((double) cbrt(y)))) * ((double) (z - t)))))) + 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.3 |
| Herbie | 1.8 |
if x < -3.4993447625500852e-108 or 3.53103351840085323e-74 < x Initial program 2.9
rmApplied div-inv3.0
Applied associate-*l*2.4
Simplified2.3
if -3.4993447625500852e-108 < x < 3.53103351840085323e-74Initial program 1.2
rmApplied add-cube-cbrt1.5
Applied *-un-lft-identity1.5
Applied times-frac1.5
Applied associate-*l*1.1
Final simplification1.8
herbie shell --seed 2020161
(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))