x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\begin{array}{l}
\mathbf{if}\;z \le -6.3520839523575088 \cdot 10^{153} \lor \neg \left(z \le 7.327475892667226 \cdot 10^{137}\right):\\
\;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\sqrt[3]{t - x}}{\sqrt[3]{a - z}} \cdot \left(\left(y - z\right) \cdot \left(\frac{\sqrt[3]{t - x}}{\sqrt[3]{a - z}} \cdot \frac{\sqrt[3]{t - x}}{\sqrt[3]{a - z}}\right)\right)\\
\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 <= -6.352083952357509e+153) || !(z <= 7.327475892667226e+137))) {
VAR = ((double) (t + ((double) (y * ((double) (((double) (x / z)) - ((double) (t / z))))))));
} else {
VAR = ((double) (x + ((double) (((double) (((double) cbrt(((double) (t - x)))) / ((double) cbrt(((double) (a - z)))))) * ((double) (((double) (y - z)) * ((double) (((double) (((double) cbrt(((double) (t - x)))) / ((double) cbrt(((double) (a - z)))))) * ((double) (((double) cbrt(((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.2 |
|---|---|
| Target | 11.9 |
| Herbie | 9.7 |
if z < -6.3520839523575088e153 or 7.327475892667226e137 < z Initial program 46.6
Simplified26.8
Taylor expanded around inf 25.7
Simplified16.4
if -6.3520839523575088e153 < z < 7.327475892667226e137Initial program 15.0
Simplified9.4
rmApplied add-cube-cbrt10.0
Applied add-cube-cbrt10.1
Applied times-frac10.1
Applied associate-*r*6.9
Simplified6.9
Final simplification9.7
herbie shell --seed 2020185
(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))))