\frac{\tan \left(\frac{x}{y \cdot 2}\right)}{\sin \left(\frac{x}{y \cdot 2}\right)}\begin{array}{l}
\mathbf{if}\;\frac{\tan \left(\frac{x}{y \cdot 2}\right)}{\sin \left(\frac{x}{y \cdot 2}\right)} \le 2.388236677338849:\\
\;\;\;\;\sqrt[3]{{\left(\frac{\sin \left(\frac{x}{y \cdot 2}\right)}{\sin \left(\frac{x}{y \cdot 2}\right) \cdot \log \left(e^{\cos \left(\frac{x}{y \cdot 2}\right)}\right)}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}double f(double x, double y) {
double r1299700 = x;
double r1299701 = y;
double r1299702 = 2.0;
double r1299703 = r1299701 * r1299702;
double r1299704 = r1299700 / r1299703;
double r1299705 = tan(r1299704);
double r1299706 = sin(r1299704);
double r1299707 = r1299705 / r1299706;
return r1299707;
}
double f(double x, double y) {
double r1299708 = x;
double r1299709 = y;
double r1299710 = 2.0;
double r1299711 = r1299709 * r1299710;
double r1299712 = r1299708 / r1299711;
double r1299713 = tan(r1299712);
double r1299714 = sin(r1299712);
double r1299715 = r1299713 / r1299714;
double r1299716 = 2.388236677338849;
bool r1299717 = r1299715 <= r1299716;
double r1299718 = cos(r1299712);
double r1299719 = exp(r1299718);
double r1299720 = log(r1299719);
double r1299721 = r1299714 * r1299720;
double r1299722 = r1299714 / r1299721;
double r1299723 = 3.0;
double r1299724 = pow(r1299722, r1299723);
double r1299725 = cbrt(r1299724);
double r1299726 = 1.0;
double r1299727 = r1299717 ? r1299725 : r1299726;
return r1299727;
}




Bits error versus x




Bits error versus y
Results
| Original | 35.8 |
|---|---|
| Target | 29.0 |
| Herbie | 27.9 |
if (/ (tan (/ x (* y 2.0))) (sin (/ x (* y 2.0)))) < 2.388236677338849Initial program 24.9
rmApplied add-cbrt-cube45.6
Applied add-cbrt-cube45.2
Applied cbrt-undiv45.2
Simplified24.9
rmApplied tan-quot24.9
Applied associate-/l/24.9
rmApplied add-log-exp24.9
if 2.388236677338849 < (/ (tan (/ x (* y 2.0))) (sin (/ x (* y 2.0)))) Initial program 62.4
Taylor expanded around 0 35.0
Final simplification27.9
herbie shell --seed 2020047
(FPCore (x y)
:name "Diagrams.TwoD.Layout.CirclePacking:approxRadius from diagrams-contrib-1.3.0.5"
:precision binary64
:herbie-target
(if (< y -1.2303690911306994e+114) 1 (if (< y -9.102852406811914e-222) (/ (sin (/ x (* y 2))) (* (sin (/ x (* y 2))) (log (exp (cos (/ x (* y 2))))))) 1))
(/ (tan (/ x (* y 2))) (sin (/ x (* y 2)))))