\frac{x}{y} \cdot \left(z - t\right) + t\begin{array}{l}
\mathbf{if}\;y \leq -1.7155085536601324 \cdot 10^{-92}:\\
\;\;\;\;t + x \cdot \frac{z - t}{y}\\
\mathbf{elif}\;y \leq 2.365282027239989 \cdot 10^{-237}:\\
\;\;\;\;t + \frac{x \cdot \left(z - t\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt{y}} \cdot \left(\left(z - t\right) \cdot \frac{\sqrt[3]{x}}{\sqrt{y}}\right)\\
\end{array}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 VAR;
if ((y <= -1.7155085536601324e-92)) {
VAR = ((double) (t + ((double) (x * (((double) (z - t)) / y)))));
} else {
double VAR_1;
if ((y <= 2.365282027239989e-237)) {
VAR_1 = ((double) (t + (((double) (x * ((double) (z - t)))) / y)));
} else {
VAR_1 = ((double) (t + ((double) ((((double) (((double) cbrt(x)) * ((double) cbrt(x)))) / ((double) sqrt(y))) * ((double) (((double) (z - t)) * (((double) cbrt(x)) / ((double) sqrt(y)))))))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.0 |
|---|---|
| Target | 2.2 |
| Herbie | 1.6 |
if y < -1.71550855366013239e-92Initial program 1.1
Simplified1.8
if -1.71550855366013239e-92 < y < 2.3652820272399889e-237Initial program 5.4
rmApplied associate-*l/3.6
if 2.3652820272399889e-237 < y Initial program 1.6
rmApplied add-sqr-sqrt1.8
Applied add-cube-cbrt2.1
Applied times-frac2.1
Applied associate-*l*0.8
Simplified0.8
Final simplification1.6
herbie shell --seed 2020196
(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))