x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\begin{array}{l}
\mathbf{if}\;z \le -7.37766926971836463 \cdot 10^{165} \lor \neg \left(z \le 7.6135996573572329 \cdot 10^{135}\right):\\
\;\;\;\;y \cdot \left(\frac{x}{z} - \frac{t}{z}\right) + t\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((double) (x + ((double) (((double) (((double) (y - z)) * ((double) (t - x)))) / ((double) (a - z))))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((z <= -7.377669269718365e+165) || !(z <= 7.613599657357233e+135))) {
VAR = ((double) (((double) (y * ((double) (((double) (x / z)) - ((double) (t / z)))))) + t));
} else {
VAR = ((double) (x + ((double) (((double) (((double) (y - z)) / ((double) (((double) cbrt(((double) (a - z)))) * ((double) cbrt(((double) (a - z)))))))) * ((double) (((double) (t - x)) / ((double) cbrt(((double) (a - z))))))))));
}
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.7 |
|---|---|
| Target | 12.0 |
| Herbie | 10.4 |
if z < -7.37766926971836463e165 or 7.6135996573572329e135 < z Initial program 48.5
rmApplied add-cube-cbrt48.8
Applied times-frac25.0
rmApplied add-cube-cbrt25.2
Applied associate-*l*25.2
Taylor expanded around inf 25.7
Simplified16.2
if -7.37766926971836463e165 < z < 7.6135996573572329e135Initial program 14.9
rmApplied add-cube-cbrt15.4
Applied times-frac8.0
Final simplification10.4
herbie shell --seed 2020164
(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))))