x + \frac{y \cdot \left(z - x\right)}{t}\begin{array}{l}
\mathbf{if}\;t \le -27905895958591340:\\
\;\;\;\;x + y \cdot \frac{z - x}{t}\\
\mathbf{elif}\;t \le 1.56451213094456709 \cdot 10^{92}:\\
\;\;\;\;x + \frac{1}{\frac{t}{y \cdot \left(z - x\right)}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{z - x}{\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 ((t <= -2.790589595859134e+16)) {
VAR = ((double) (x + ((double) (y * ((double) (((double) (z - x)) / t))))));
} else {
double VAR_1;
if ((t <= 1.564512130944567e+92)) {
VAR_1 = ((double) (x + ((double) (1.0 / ((double) (t / ((double) (y * ((double) (z - x))))))))));
} else {
VAR_1 = ((double) (x + ((double) (((double) (y / ((double) (((double) cbrt(t)) * ((double) cbrt(t)))))) * ((double) (((double) (z - x)) / ((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.1 |
|---|---|
| Target | 2.0 |
| Herbie | 1.5 |
if t < -27905895958591340Initial program 9.1
rmApplied *-un-lft-identity9.1
Applied times-frac1.0
Simplified1.0
if -27905895958591340 < t < 1.56451213094456709e92Initial program 2.0
rmApplied clear-num2.0
if 1.56451213094456709e92 < t Initial program 10.7
rmApplied add-cube-cbrt10.9
Applied times-frac1.0
Final simplification1.5
herbie shell --seed 2020162
(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)))