x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\begin{array}{l}
\mathbf{if}\;a \le -9.0004575730348785 \cdot 10^{-222}:\\
\;\;\;\;x + \frac{\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}}\\
\mathbf{elif}\;a \le 9.4774732148630875 \cdot 10^{-184}:\\
\;\;\;\;\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 <= -9.000457573034878e-222)) {
VAR = (x + ((((y - z) / (cbrt((a - z)) * cbrt((a - z)))) / cbrt((cbrt((a - z)) * cbrt((a - z))))) * ((t - x) / cbrt(cbrt((a - z))))));
} else {
double VAR_1;
if ((a <= 9.477473214863088e-184)) {
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.6 |
|---|---|
| Target | 11.9 |
| Herbie | 10.5 |
if a < -9.000457573034878e-222Initial program 23.6
rmApplied add-cube-cbrt24.1
Applied times-frac11.0
rmApplied add-cube-cbrt11.0
Applied cbrt-prod11.0
Applied *-un-lft-identity11.0
Applied times-frac11.0
Applied associate-*r*10.9
Simplified10.9
if -9.000457573034878e-222 < a < 9.477473214863088e-184Initial program 30.9
Taylor expanded around inf 11.7
if 9.477473214863088e-184 < a Initial program 23.2
rmApplied add-cube-cbrt23.6
Applied times-frac10.0
rmApplied add-cube-cbrt10.0
Applied cbrt-prod10.1
Applied add-cube-cbrt10.2
Applied times-frac10.2
Applied associate-*r*9.8
Final simplification10.5
herbie shell --seed 2020103
(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))))