x + \frac{y \cdot \left(z - x\right)}{t}\begin{array}{l}
\mathbf{if}\;t \le -7.1695213092024352 \cdot 10^{-11}:\\
\;\;\;\;x + y \cdot \frac{z - x}{t}\\
\mathbf{elif}\;t \le 5.0656445702721152 \cdot 10^{25}:\\
\;\;\;\;x + \frac{1}{\frac{t}{y \cdot \left(z - x\right)}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z - x}}\\
\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 <= -7.169521309202435e-11)) {
VAR = ((double) (x + ((double) (y * ((double) (((double) (z - x)) / t))))));
} else {
double VAR_1;
if ((t <= 5.065644570272115e+25)) {
VAR_1 = ((double) (x + ((double) (1.0 / ((double) (t / ((double) (y * ((double) (z - x))))))))));
} else {
VAR_1 = ((double) (x + ((double) (y / ((double) (t / ((double) (z - x))))))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.7 |
|---|---|
| Target | 2.1 |
| Herbie | 1.4 |
if t < -7.169521309202435e-11Initial program 9.6
rmApplied *-un-lft-identity9.6
Applied times-frac1.0
Simplified1.0
if -7.169521309202435e-11 < t < 5.065644570272115e+25Initial program 1.7
rmApplied clear-num1.8
if 5.065644570272115e+25 < t Initial program 10.1
rmApplied associate-/l*1.2
Final simplification1.4
herbie shell --seed 2020120
(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)))