x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\begin{array}{l}
\mathbf{if}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \le -2.72946199750767504 \cdot 10^{-281} \lor \neg \left(x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \le 1.5360703 \cdot 10^{-297}\right):\\
\;\;\;\;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}}}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{x \cdot y}{z} + t\right) - \frac{t \cdot y}{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 ((((x + (((y - z) * (t - x)) / (a - z))) <= -2.729461997507675e-281) || !((x + (((y - z) * (t - x)) / (a - z))) <= 1.5360702554896792e-297))) {
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))))));
} else {
VAR = ((((x * y) / z) + t) - ((t * y) / 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.3 |
|---|---|
| Target | 11.9 |
| Herbie | 8.8 |
if (+ x (/ (* (- y z) (- t x)) (- a z))) < -2.729461997507675e-281 or 1.5360702554896792e-297 < (+ x (/ (* (- y z) (- t x)) (- a z))) Initial program 20.9
rmApplied add-cube-cbrt21.4
Applied times-frac8.2
rmApplied add-cube-cbrt8.2
Applied cbrt-prod8.3
Applied add-cube-cbrt8.4
Applied times-frac8.4
Applied associate-*r*7.8
if -2.729461997507675e-281 < (+ x (/ (* (- y z) (- t x)) (- a z))) < 1.5360702554896792e-297Initial program 58.3
Taylor expanded around inf 19.2
Final simplification8.8
herbie shell --seed 2020079
(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))))