x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\begin{array}{l}
\mathbf{if}\;a \le -2.91990685690419784 \cdot 10^{-73}:\\
\;\;\;\;x + \frac{\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}}{\sqrt[3]{a - z}} \cdot \left(\frac{\sqrt[3]{y - z}}{\sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\right)\\
\mathbf{elif}\;a \le 2.71826306175253464 \cdot 10^{-110}:\\
\;\;\;\;\left(\frac{x \cdot y}{z} + t\right) - \frac{t \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}\right) \cdot \frac{\sqrt[3]{t - x}}{\sqrt[3]{\sqrt[3]{a - z}}}\\
\end{array}double code(double x, double y, double z, double t, double a) {
return (x + (((y - z) * (t - x)) / (a - z)));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if ((a <= -2.919906856904198e-73)) {
VAR = (x + (((cbrt((y - z)) * cbrt((y - z))) / cbrt((a - z))) * ((cbrt((y - z)) / cbrt((a - z))) * ((t - x) / cbrt((a - z))))));
} else {
double VAR_1;
if ((a <= 2.7182630617525346e-110)) {
VAR_1 = ((((x * y) / z) + t) - ((t * y) / z));
} else {
VAR_1 = (x + ((((y - z) / (cbrt((a - z)) * cbrt((a - z)))) * ((cbrt((t - x)) * cbrt((t - x))) / cbrt((cbrt((a - z)) * cbrt((a - z)))))) * (cbrt((t - x)) / cbrt(cbrt((a - z))))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.5 |
|---|---|
| Target | 11.7 |
| Herbie | 10.6 |
if a < -2.919906856904198e-73Initial program 21.9
rmApplied add-cube-cbrt22.3
Applied times-frac7.3
rmApplied add-cube-cbrt7.2
Applied times-frac7.2
Applied associate-*l*7.1
if -2.919906856904198e-73 < a < 2.7182630617525346e-110Initial program 29.8
Taylor expanded around inf 16.4
if 2.7182630617525346e-110 < a Initial program 22.3
rmApplied add-cube-cbrt22.7
Applied times-frac8.9
rmApplied add-cube-cbrt9.0
Applied cbrt-prod9.0
Applied add-cube-cbrt9.1
Applied times-frac9.1
Applied associate-*r*8.7
Final simplification10.6
herbie shell --seed 2020102
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))
(+ x (/ (* (- y z) (- t x)) (- a z))))