x + \frac{y \cdot \left(z - x\right)}{t}\begin{array}{l}
\mathbf{if}\;x + \frac{\left(z - x\right) \cdot y}{t} \le -1.965083146290500614286341897407845344146 \cdot 10^{301}:\\
\;\;\;\;\frac{1}{\frac{\frac{t}{y}}{z - x}} + x\\
\mathbf{elif}\;x + \frac{\left(z - x\right) \cdot y}{t} \le 3.04632394684078922300073031209134710354 \cdot 10^{288}:\\
\;\;\;\;x + \frac{\left(z - x\right) \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{t}{y}}{z - x}} + x\\
\end{array}double f(double x, double y, double z, double t) {
double r15359831 = x;
double r15359832 = y;
double r15359833 = z;
double r15359834 = r15359833 - r15359831;
double r15359835 = r15359832 * r15359834;
double r15359836 = t;
double r15359837 = r15359835 / r15359836;
double r15359838 = r15359831 + r15359837;
return r15359838;
}
double f(double x, double y, double z, double t) {
double r15359839 = x;
double r15359840 = z;
double r15359841 = r15359840 - r15359839;
double r15359842 = y;
double r15359843 = r15359841 * r15359842;
double r15359844 = t;
double r15359845 = r15359843 / r15359844;
double r15359846 = r15359839 + r15359845;
double r15359847 = -1.9650831462905006e+301;
bool r15359848 = r15359846 <= r15359847;
double r15359849 = 1.0;
double r15359850 = r15359844 / r15359842;
double r15359851 = r15359850 / r15359841;
double r15359852 = r15359849 / r15359851;
double r15359853 = r15359852 + r15359839;
double r15359854 = 3.046323946840789e+288;
bool r15359855 = r15359846 <= r15359854;
double r15359856 = r15359855 ? r15359846 : r15359853;
double r15359857 = r15359848 ? r15359853 : r15359856;
return r15359857;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.6 |
|---|---|
| Target | 2.0 |
| Herbie | 1.0 |
if (+ x (/ (* y (- z x)) t)) < -1.9650831462905006e+301 or 3.046323946840789e+288 < (+ x (/ (* y (- z x)) t)) Initial program 50.6
rmApplied clear-num50.6
rmApplied associate-/r*2.0
if -1.9650831462905006e+301 < (+ x (/ (* y (- z x)) t)) < 3.046323946840789e+288Initial program 0.9
Final simplification1.0
herbie shell --seed 2019192
(FPCore (x y z t)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D"
:herbie-target
(- x (+ (* x (/ y t)) (* (- z) (/ y t))))
(+ x (/ (* y (- z x)) t)))