x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\begin{array}{l}
\mathbf{if}\;z \le -3.2165983826730228 \cdot 10^{246} \lor \neg \left(z \le 9.10019436889470365 \cdot 10^{191}\right):\\
\;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\
\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 (((z <= -3.216598382673023e+246) || !(z <= 9.100194368894704e+191))) {
VAR = (t + (y * ((x / z) - (t / z))));
} else {
VAR = (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))))));
}
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.5 |
| Herbie | 10.3 |
if z < -3.216598382673023e+246 or 9.100194368894704e+191 < z Initial program 50.3
rmApplied add-cube-cbrt50.6
Applied times-frac27.4
rmApplied add-cube-cbrt27.4
Applied cbrt-prod27.4
Applied add-cube-cbrt27.6
Applied times-frac27.6
Applied associate-*r*26.8
Taylor expanded around inf 23.5
Simplified13.6
if -3.216598382673023e+246 < z < 9.100194368894704e+191Initial program 19.6
rmApplied add-cube-cbrt20.0
Applied times-frac10.1
rmApplied add-cube-cbrt10.1
Applied cbrt-prod10.2
Applied add-cube-cbrt10.3
Applied times-frac10.3
Applied associate-*r*9.7
Final simplification10.3
herbie shell --seed 2020100
(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))))