\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{\frac{\sin \left(\frac{x}{y \cdot 2}\right)}{\log \left(e^{\cos \left(\frac{x}{y \cdot 2}\right)}\right)}}{\sin \left(\frac{x}{y \cdot 2}\right)}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}double f(double x, double y) {
double r987644 = x;
double r987645 = y;
double r987646 = 2.0;
double r987647 = r987645 * r987646;
double r987648 = r987644 / r987647;
double r987649 = tan(r987648);
double r987650 = sin(r987648);
double r987651 = r987649 / r987650;
return r987651;
}
double f(double x, double y) {
double r987652 = x;
double r987653 = y;
double r987654 = 2.0;
double r987655 = r987653 * r987654;
double r987656 = r987652 / r987655;
double r987657 = tan(r987656);
double r987658 = sin(r987656);
double r987659 = r987657 / r987658;
double r987660 = 2.388236677338849;
bool r987661 = r987659 <= r987660;
double r987662 = cos(r987656);
double r987663 = exp(r987662);
double r987664 = log(r987663);
double r987665 = r987658 / r987664;
double r987666 = r987665 / r987658;
double r987667 = 3.0;
double r987668 = pow(r987666, r987667);
double r987669 = cbrt(r987668);
double r987670 = 1.0;
double r987671 = r987661 ? r987669 : r987670;
return r987671;
}




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
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)))))