x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\begin{array}{l}
\mathbf{if}\;a \leq -3.0348554888084793 \cdot 10^{-89} \lor \neg \left(a \leq 2.0734958753318865 \cdot 10^{-201}\right):\\
\;\;\;\;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)\\
\mathbf{else}:\\
\;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((double) (x + (((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 (((a <= -3.0348554888084793e-89) || !(a <= 2.0734958753318865e-201))) {
VAR = ((double) (x + ((double) ((((double) cbrt(((double) (t - x)))) / ((double) cbrt(((double) (a - z))))) * ((double) (((double) (y - z)) * ((double) ((((double) cbrt(((double) (t - x)))) / ((double) cbrt(((double) (a - z))))) * (((double) cbrt(((double) (t - x)))) / ((double) cbrt(((double) (a - z)))))))))))));
} else {
VAR = ((double) (t + ((double) (y * ((double) ((x / z) - (t / 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.3 |
| Herbie | 10.5 |
if a < -3.03485548880847928e-89 or 2.0734958753318865e-201 < a Initial program 23.3
Simplified12.0
rmApplied add-cube-cbrt12.4
Applied add-cube-cbrt12.6
Applied times-frac12.6
Applied associate-*r*9.8
Simplified9.8
if -3.03485548880847928e-89 < a < 2.0734958753318865e-201Initial program 29.4
Simplified26.0
Taylor expanded around inf 14.2
Simplified12.7
Final simplification10.5
herbie shell --seed 2020196
(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))))