x + \frac{y \cdot \left(z - x\right)}{t}\begin{array}{l}
\mathbf{if}\;x + \frac{y \cdot \left(z - x\right)}{t} \le -3.4760467715488486 \cdot 10^{-259}:\\
\;\;\;\;x + \frac{y}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{z - x}{\sqrt[3]{t}}\\
\mathbf{elif}\;x + \frac{y \cdot \left(z - x\right)}{t} \le 6.66498605674414355 \cdot 10^{303}:\\
\;\;\;\;x + \frac{y \cdot \left(z - x\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{x}{t}\right)\\
\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 ((((double) (x + ((double) (((double) (y * ((double) (z - x)))) / t)))) <= -3.4760467715488486e-259)) {
VAR = ((double) (x + ((double) (((double) (y / ((double) (((double) cbrt(t)) * ((double) cbrt(t)))))) * ((double) (((double) (z - x)) / ((double) cbrt(t))))))));
} else {
double VAR_1;
if ((((double) (x + ((double) (((double) (y * ((double) (z - x)))) / t)))) <= 6.664986056744144e+303)) {
VAR_1 = ((double) (x + ((double) (((double) (y * ((double) (z - x)))) / t))));
} else {
VAR_1 = ((double) (x + ((double) (y * ((double) (((double) (z / t)) - ((double) (x / 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.3 |
| Herbie | 2.0 |
if (+ x (/ (* y (- z x)) t)) < -3.4760467715488486e-259Initial program 5.9
rmApplied add-cube-cbrt6.4
Applied times-frac2.9
if -3.4760467715488486e-259 < (+ x (/ (* y (- z x)) t)) < 6.66498605674414355e303Initial program 1.0
if 6.66498605674414355e303 < (+ x (/ (* y (- z x)) t)) Initial program 58.3
rmApplied add-cube-cbrt58.4
Applied times-frac2.3
Taylor expanded around 0 58.3
Simplified2.7
Final simplification2.0
herbie shell --seed 2020168
(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)))