x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\begin{array}{l}
\mathbf{if}\;a \le -8.80426897056057865 \cdot 10^{-31}:\\
\;\;\;\;x + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\\
\mathbf{elif}\;a \le -6.0634665926229038 \cdot 10^{-122}:\\
\;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\
\mathbf{elif}\;a \le -5.9951198603825959 \cdot 10^{-141}:\\
\;\;\;\;x + \left(\left(y - z\right) \cdot \left(t - x\right)\right) \cdot \frac{1}{a - z}\\
\mathbf{elif}\;a \le 2.9536675567106517 \cdot 10^{-219}:\\
\;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\
\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 ((a <= -8.804268970560579e-31)) {
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))))))))));
} else {
double VAR_1;
if ((a <= -6.063466592622904e-122)) {
VAR_1 = ((double) (t + ((double) (y * ((double) (((double) (x / z)) - ((double) (t / z))))))));
} else {
double VAR_2;
if ((a <= -5.995119860382596e-141)) {
VAR_2 = ((double) (x + ((double) (((double) (((double) (y - z)) * ((double) (t - x)))) * ((double) (1.0 / ((double) (a - z))))))));
} else {
double VAR_3;
if ((a <= 2.953667556710652e-219)) {
VAR_3 = ((double) (t + ((double) (((double) (y / z)) * ((double) (x - t))))));
} else {
VAR_3 = ((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))))))))));
}
VAR_2 = VAR_3;
}
VAR_1 = VAR_2;
}
VAR = VAR_1;
}
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.3 |
| Herbie | 10.5 |
if a < -8.80426897056057865e-31 or 2.9536675567106517e-219 < a Initial program 23.1
Simplified11.2
rmApplied add-cube-cbrt11.7
Applied *-un-lft-identity11.7
Applied times-frac11.7
Applied associate-*r*9.5
Simplified9.5
if -8.80426897056057865e-31 < a < -6.0634665926229038e-122Initial program 27.0
Simplified23.1
Taylor expanded around inf 28.5
Simplified24.7
if -6.0634665926229038e-122 < a < -5.9951198603825959e-141Initial program 26.0
Simplified18.0
rmApplied div-inv18.0
Applied associate-*r*26.0
if -5.9951198603825959e-141 < a < 2.9536675567106517e-219Initial program 29.6
Simplified24.9
rmApplied add-cube-cbrt25.6
Applied associate-*r*25.6
Taylor expanded around inf 13.3
Simplified7.9
Final simplification10.5
herbie shell --seed 2020184
(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))))