x + \frac{y \cdot \left(z - x\right)}{t}\begin{array}{l}
\mathbf{if}\;x \leq -3.2274220469820457 \cdot 10^{-196} \lor \neg \left(x \leq 1.1367150419428766 \cdot 10^{-154}\right):\\
\;\;\;\;x + \frac{1}{\frac{\frac{t}{y}}{z - x}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{t}} \cdot \left(\frac{z - x}{\sqrt[3]{t}} \cdot \frac{\sqrt[3]{y}}{\sqrt[3]{t}}\right)\\
\end{array}double code(double x, double y, double z, double t) {
return ((double) (x + (((double) (y * ((double) (z - x)))) / t)));
}
double code(double x, double y, double z, double t) {
double VAR;
if (((x <= -3.2274220469820457e-196) || !(x <= 1.1367150419428766e-154))) {
VAR = ((double) (x + (1.0 / ((t / y) / ((double) (z - x))))));
} else {
VAR = ((double) (x + ((double) ((((double) (((double) cbrt(y)) * ((double) cbrt(y)))) / ((double) cbrt(t))) * ((double) ((((double) (z - x)) / ((double) cbrt(t))) * (((double) cbrt(y)) / ((double) cbrt(t)))))))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.8 |
|---|---|
| Target | 2.0 |
| Herbie | 1.3 |
if x < -3.2274220469820457e-196 or 1.1367150419428766e-154 < x Initial program 7.1
rmApplied clear-num7.1
rmApplied associate-/r*1.0
if -3.2274220469820457e-196 < x < 1.1367150419428766e-154Initial program 6.0
rmApplied add-cube-cbrt6.7
Applied times-frac4.7
rmApplied add-cube-cbrt4.9
Applied times-frac4.9
Applied associate-*l*2.2
Simplified2.2
Final simplification1.3
herbie shell --seed 2020196
(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)) (* (- z) (/ y t))))
(+ x (/ (* y (- z x)) t)))