\frac{x}{y} \cdot \left(z - t\right) + t\begin{array}{l}
\mathbf{if}\;x \le -1.5507018103804069 \cdot 10^{54}:\\
\;\;\;\;\frac{x}{\sqrt[3]{y} \cdot \sqrt[3]{y}} \cdot \frac{z - t}{\sqrt[3]{y}} + t\\
\mathbf{elif}\;x \le 8.515468159734346 \cdot 10^{-92}:\\
\;\;\;\;\frac{1}{\sqrt[3]{y} \cdot \sqrt[3]{y}} \cdot \left(\frac{x}{\sqrt[3]{y}} \cdot \left(z - t\right)\right) + 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 VAR;
if ((x <= -1.550701810380407e+54)) {
VAR = (((x / (cbrt(y) * cbrt(y))) * ((z - t) / cbrt(y))) + t);
} else {
double VAR_1;
if ((x <= 8.515468159734346e-92)) {
VAR_1 = (((1.0 / (cbrt(y) * cbrt(y))) * ((x / cbrt(y)) * (z - t))) + t);
} else {
VAR_1 = ((x * ((z - t) / y)) + t);
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.1 |
|---|---|
| Target | 2.4 |
| Herbie | 1.8 |
if x < -1.550701810380407e+54Initial program 4.7
rmApplied div-inv4.8
Applied associate-*l*2.2
Simplified2.1
rmApplied add-cube-cbrt2.9
Applied *-un-lft-identity2.9
Applied times-frac2.9
Applied associate-*r*3.6
Simplified3.6
if -1.550701810380407e+54 < x < 8.515468159734346e-92Initial program 1.3
rmApplied add-cube-cbrt1.7
Applied *-un-lft-identity1.7
Applied times-frac1.7
Applied associate-*l*1.0
if 8.515468159734346e-92 < x Initial program 2.5
rmApplied div-inv2.6
Applied associate-*l*2.3
Simplified2.3
Final simplification1.8
herbie shell --seed 2020106
(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))