x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\begin{array}{l}
\mathbf{if}\;a \le -9.8404651186129391 \cdot 10^{-176}:\\
\;\;\;\;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 4.92493862195949841 \cdot 10^{-109}:\\
\;\;\;\;\left(\frac{x \cdot y}{z} + t\right) - \frac{t \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\sqrt[3]{y - z}}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \left(\frac{\sqrt[3]{y - z}}{\sqrt[3]{\sqrt[3]{a - z}}} \cdot \left(\frac{\sqrt[3]{y - z}}{\sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\right)\right)\\
\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.840465118612939e-176)) {
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 <= 4.924938621959498e-109)) {
VAR_1 = ((((x * y) / z) + t) - ((t * y) / z));
} else {
VAR_1 = (x + ((cbrt((y - z)) / cbrt((cbrt((a - z)) * cbrt((a - z))))) * ((cbrt((y - z)) / cbrt(cbrt((a - z)))) * ((cbrt((y - z)) / cbrt((a - z))) * ((t - x) / 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.2 |
|---|---|
| Target | 12.0 |
| Herbie | 10.8 |
if a < -9.840465118612939e-176Initial program 23.1
rmApplied add-cube-cbrt23.5
Applied times-frac10.4
rmApplied add-cube-cbrt10.4
Applied times-frac10.4
Applied associate-*l*10.2
if -9.840465118612939e-176 < a < 4.924938621959498e-109Initial program 28.2
Taylor expanded around inf 14.3
if 4.924938621959498e-109 < a Initial program 22.8
rmApplied add-cube-cbrt23.2
Applied times-frac9.2
rmApplied add-cube-cbrt9.2
Applied times-frac9.2
Applied associate-*l*9.0
rmApplied add-cube-cbrt9.1
Applied cbrt-prod9.1
Applied times-frac9.1
Applied associate-*l*9.1
Final simplification10.8
herbie shell --seed 2020091
(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))))