x - \frac{y \cdot \left(z - t\right)}{a}\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z - t\right)}{a} = -\infty:\\
\;\;\;\;x - \frac{\frac{y}{a}}{\frac{1}{z - t}}\\
\mathbf{elif}\;\frac{y \cdot \left(z - t\right)}{a} \le 1.3025853576837356 \cdot 10^{290}:\\
\;\;\;\;x - {\left(\frac{y \cdot \left(z - t\right)}{a}\right)}^{1}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{z - t}{a}\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r296761 = x;
double r296762 = y;
double r296763 = z;
double r296764 = t;
double r296765 = r296763 - r296764;
double r296766 = r296762 * r296765;
double r296767 = a;
double r296768 = r296766 / r296767;
double r296769 = r296761 - r296768;
return r296769;
}
double f(double x, double y, double z, double t, double a) {
double r296770 = y;
double r296771 = z;
double r296772 = t;
double r296773 = r296771 - r296772;
double r296774 = r296770 * r296773;
double r296775 = a;
double r296776 = r296774 / r296775;
double r296777 = -inf.0;
bool r296778 = r296776 <= r296777;
double r296779 = x;
double r296780 = r296770 / r296775;
double r296781 = 1.0;
double r296782 = r296781 / r296773;
double r296783 = r296780 / r296782;
double r296784 = r296779 - r296783;
double r296785 = 1.3025853576837356e+290;
bool r296786 = r296776 <= r296785;
double r296787 = pow(r296776, r296781);
double r296788 = r296779 - r296787;
double r296789 = r296773 / r296775;
double r296790 = r296770 * r296789;
double r296791 = r296779 - r296790;
double r296792 = r296786 ? r296788 : r296791;
double r296793 = r296778 ? r296784 : r296792;
return r296793;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 6.5 |
|---|---|
| Target | 0.8 |
| Herbie | 0.6 |
if (/ (* y (- z t)) a) < -inf.0Initial program 64.0
rmApplied associate-/l*0.2
rmApplied div-inv0.2
Applied associate-/r*0.3
if -inf.0 < (/ (* y (- z t)) a) < 1.3025853576837356e+290Initial program 0.4
rmApplied *-un-lft-identity0.4
Applied times-frac6.2
Simplified6.2
rmApplied *-un-lft-identity6.2
Applied add-cube-cbrt6.6
Applied times-frac6.6
Applied associate-*r*1.9
Simplified1.9
rmApplied pow11.9
Applied pow11.9
Applied pow11.9
Applied pow11.9
Applied pow-prod-down1.9
Applied pow-prod-down1.9
Applied pow-prod-down1.9
Simplified0.4
if 1.3025853576837356e+290 < (/ (* y (- z t)) a) Initial program 52.7
rmApplied *-un-lft-identity52.7
Applied times-frac4.8
Simplified4.8
Final simplification0.6
herbie shell --seed 2020056
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
:precision binary64
:herbie-target
(if (< y -1.0761266216389975e-10) (- x (/ 1 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (- x (/ (* y (- z t)) a)) (- x (/ y (/ a (- z t))))))
(- x (/ (* y (- z t)) a)))