\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 r1253635 = x;
double r1253636 = y;
double r1253637 = 2.0;
double r1253638 = r1253636 * r1253637;
double r1253639 = r1253635 / r1253638;
double r1253640 = tan(r1253639);
double r1253641 = sin(r1253639);
double r1253642 = r1253640 / r1253641;
return r1253642;
}
double f(double x, double y) {
double r1253643 = x;
double r1253644 = y;
double r1253645 = 2.0;
double r1253646 = r1253644 * r1253645;
double r1253647 = r1253643 / r1253646;
double r1253648 = tan(r1253647);
double r1253649 = sin(r1253647);
double r1253650 = r1253648 / r1253649;
double r1253651 = 2.388236677338849;
bool r1253652 = r1253650 <= r1253651;
double r1253653 = cos(r1253647);
double r1253654 = exp(r1253653);
double r1253655 = log(r1253654);
double r1253656 = r1253649 * r1253655;
double r1253657 = r1253649 / r1253656;
double r1253658 = 3.0;
double r1253659 = pow(r1253657, r1253658);
double r1253660 = cbrt(r1253659);
double r1253661 = 1.0;
double r1253662 = r1253652 ? r1253660 : r1253661;
return r1253662;
}




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