x + \frac{y \cdot \left(z - t\right)}{a}\begin{array}{l}
\mathbf{if}\;y \le -3.506169073250434556576682563271829432785 \cdot 10^{60} \lor \neg \left(y \le 5122316469.390033721923828125\right):\\
\;\;\;\;x - y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot \left(t - z\right)}{a}\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r271839 = x;
double r271840 = y;
double r271841 = z;
double r271842 = t;
double r271843 = r271841 - r271842;
double r271844 = r271840 * r271843;
double r271845 = a;
double r271846 = r271844 / r271845;
double r271847 = r271839 + r271846;
return r271847;
}
double f(double x, double y, double z, double t, double a) {
double r271848 = y;
double r271849 = -3.5061690732504346e+60;
bool r271850 = r271848 <= r271849;
double r271851 = 5122316469.390034;
bool r271852 = r271848 <= r271851;
double r271853 = !r271852;
bool r271854 = r271850 || r271853;
double r271855 = x;
double r271856 = t;
double r271857 = z;
double r271858 = r271856 - r271857;
double r271859 = a;
double r271860 = r271858 / r271859;
double r271861 = r271848 * r271860;
double r271862 = r271855 - r271861;
double r271863 = r271848 * r271858;
double r271864 = r271863 / r271859;
double r271865 = r271855 - r271864;
double r271866 = r271854 ? r271862 : r271865;
return r271866;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 6.3 |
|---|---|
| Target | 0.6 |
| Herbie | 0.8 |
if y < -3.5061690732504346e+60 or 5122316469.390034 < y Initial program 18.0
Simplified4.5
rmApplied div-inv4.6
Applied associate-*l*1.0
Simplified0.9
if -3.5061690732504346e+60 < y < 5122316469.390034Initial program 0.8
Simplified1.7
rmApplied add-cube-cbrt2.2
Applied add-cube-cbrt2.3
Applied times-frac2.3
Applied associate-*l*0.8
Simplified0.9
rmApplied pow10.9
Applied pow10.9
Applied pow-prod-down0.9
Simplified0.8
Final simplification0.8
herbie shell --seed 2019174
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
:herbie-target
(if (< y -1.0761266216389975e-10) (+ x (/ 1.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (+ x (/ (* y (- z t)) a)) (+ x (/ y (/ a (- z t))))))
(+ x (/ (* y (- z t)) a)))