x + \frac{y \cdot \left(z - x\right)}{t}\begin{array}{l}
\mathbf{if}\;y \le -72395.033720331005:\\
\;\;\;\;x + \left(\frac{y}{\frac{t}{z}} - \frac{y}{\frac{t}{x}}\right)\\
\mathbf{elif}\;y \le -1.78307652196547843 \cdot 10^{-183}:\\
\;\;\;\;x + \frac{y \cdot \left(z - x\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{y}{{\left(\sqrt[3]{t}\right)}^{2}} \cdot \left(\sqrt[3]{z - x} \cdot \frac{\sqrt[3]{z - x}}{\sqrt[3]{{\left(\sqrt[3]{t}\right)}^{2}}}\right)\right) \cdot \frac{\sqrt[3]{z - x}}{\sqrt[3]{\sqrt[3]{t}}}\\
\end{array}double code(double x, double y, double z, double t) {
return ((double) (x + ((double) (((double) (y * ((double) (z - x)))) / t))));
}
double code(double x, double y, double z, double t) {
double VAR;
if ((y <= -72395.033720331)) {
VAR = ((double) (x + ((double) (((double) (y / ((double) (t / z)))) - ((double) (y / ((double) (t / x))))))));
} else {
double VAR_1;
if ((y <= -1.7830765219654784e-183)) {
VAR_1 = ((double) (x + ((double) (((double) (y * ((double) (z - x)))) / t))));
} else {
VAR_1 = ((double) (x + ((double) (((double) (((double) (y / ((double) pow(((double) cbrt(t)), 2.0)))) * ((double) (((double) cbrt(((double) (z - x)))) * ((double) (((double) cbrt(((double) (z - x)))) / ((double) cbrt(((double) pow(((double) cbrt(t)), 2.0)))))))))) * ((double) (((double) cbrt(((double) (z - x)))) / ((double) cbrt(((double) cbrt(t))))))))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.5 |
|---|---|
| Target | 2.0 |
| Herbie | 1.5 |
if y < -72395.033720331005Initial program 15.9
Simplified1.3
rmApplied add-cube-cbrt2.1
Applied *-un-lft-identity2.1
Applied times-frac2.1
Applied associate-*r*2.4
Simplified2.4
rmApplied add-cube-cbrt2.5
Applied cbrt-prod2.5
Applied add-cube-cbrt2.7
Applied times-frac2.7
Applied associate-*r*2.6
Simplified2.6
Taylor expanded around 0 15.9
Simplified1.6
if -72395.033720331005 < y < -1.78307652196547843e-183Initial program 0.5
if -1.78307652196547843e-183 < y Initial program 5.7
Simplified7.4
rmApplied add-cube-cbrt7.9
Applied *-un-lft-identity7.9
Applied times-frac7.9
Applied associate-*r*3.5
Simplified3.5
rmApplied add-cube-cbrt3.6
Applied cbrt-prod3.6
Applied add-cube-cbrt3.7
Applied times-frac3.7
Applied associate-*r*1.8
Simplified1.8
Final simplification1.5
herbie shell --seed 2020184
(FPCore (x y z t)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D"
:precision binary64
:herbie-target
(- x (+ (* x (/ y t)) (* (neg z) (/ y t))))
(+ x (/ (* y (- z x)) t)))