x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\begin{array}{l}
\mathbf{if}\;a \le -6.2270682752499666 \cdot 10^{-75}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;a \le 1.8049874192490836 \cdot 10^{-111}:\\
\;\;\;\;\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]{\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 <= -6.227068275249967e-75)) {
VAR = (x + ((y - z) * ((t - x) / (a - z))));
} else {
double VAR_1;
if ((a <= 1.8049874192490836e-111)) {
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(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.4 |
|---|---|
| Target | 12.2 |
| Herbie | 12.0 |
if a < -6.227068275249967e-75Initial program 22.6
rmApplied *-un-lft-identity22.6
Applied times-frac10.3
Simplified10.3
if -6.227068275249967e-75 < a < 1.8049874192490836e-111Initial program 28.8
Taylor expanded around inf 16.4
if 1.8049874192490836e-111 < a Initial program 22.2
rmApplied add-cube-cbrt22.5
Applied times-frac9.8
rmApplied add-cube-cbrt9.9
Applied add-cube-cbrt10.0
Applied times-frac10.0
Applied associate-*r*9.7
Final simplification12.0
herbie shell --seed 2020075
(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))))