x + \frac{\left(y - x\right) \cdot z}{t}\begin{array}{l}
\mathbf{if}\;t \le -5.121129492313333 \cdot 10^{35}:\\
\;\;\;\;x + \left(\sqrt[3]{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}}} \cdot \sqrt[3]{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}}}\right) \cdot \left(\sqrt[3]{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}}} \cdot \frac{z}{\sqrt[3]{t}}\right)\\
\mathbf{elif}\;t \le 1.0394980955783228 \cdot 10^{74}:\\
\;\;\;\;x + \frac{1}{\frac{t}{\left(y - x\right) \cdot z}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\sqrt[3]{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}}} \cdot \sqrt[3]{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}}}\right) \cdot \left(\left(\left(\sqrt[3]{\sqrt[3]{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}}}} \cdot \sqrt[3]{\sqrt[3]{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}}}}\right) \cdot \sqrt[3]{\sqrt[3]{\frac{y - x}{\sqrt[3]{t} \cdot \sqrt[3]{t}}}}\right) \cdot \frac{z}{\sqrt[3]{t}}\right)\\
\end{array}double code(double x, double y, double z, double t) {
return (x + (((y - x) * z) / t));
}
double code(double x, double y, double z, double t) {
double VAR;
if ((t <= -5.121129492313333e+35)) {
VAR = (x + ((cbrt(((y - x) / (cbrt(t) * cbrt(t)))) * cbrt(((y - x) / (cbrt(t) * cbrt(t))))) * (cbrt(((y - x) / (cbrt(t) * cbrt(t)))) * (z / cbrt(t)))));
} else {
double VAR_1;
if ((t <= 1.0394980955783228e+74)) {
VAR_1 = (x + (1.0 / (t / ((y - x) * z))));
} else {
VAR_1 = (x + ((cbrt(((y - x) / (cbrt(t) * cbrt(t)))) * cbrt(((y - x) / (cbrt(t) * cbrt(t))))) * (((cbrt(cbrt(((y - x) / (cbrt(t) * cbrt(t))))) * cbrt(cbrt(((y - x) / (cbrt(t) * cbrt(t)))))) * cbrt(cbrt(((y - x) / (cbrt(t) * cbrt(t)))))) * (z / cbrt(t)))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.3 |
|---|---|
| Target | 2.0 |
| Herbie | 1.4 |
if t < -5.121129492313333e+35Initial program 10.4
rmApplied add-cube-cbrt10.6
Applied times-frac0.8
rmApplied add-cube-cbrt0.9
Applied associate-*l*0.9
if -5.121129492313333e+35 < t < 1.0394980955783228e+74Initial program 1.7
rmApplied clear-num1.7
if 1.0394980955783228e+74 < t Initial program 10.7
rmApplied add-cube-cbrt10.9
Applied times-frac1.0
rmApplied add-cube-cbrt1.1
Applied associate-*l*1.1
rmApplied add-cube-cbrt1.2
Final simplification1.4
herbie shell --seed 2020078
(FPCore (x y z t)
:name "Numeric.Histogram:binBounds from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< x -9.025511195533005e-135) (- x (* (/ z t) (- x y))) (if (< x 4.275032163700715e-250) (+ x (* (/ (- y x) t) z)) (+ x (/ (- y x) (/ t z)))))
(+ x (/ (* (- y x) z) t)))