\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 r705370 = x;
double r705371 = y;
double r705372 = 2.0;
double r705373 = r705371 * r705372;
double r705374 = r705370 / r705373;
double r705375 = tan(r705374);
double r705376 = sin(r705374);
double r705377 = r705375 / r705376;
return r705377;
}
double f(double x, double y) {
double r705378 = x;
double r705379 = y;
double r705380 = 2.0;
double r705381 = r705379 * r705380;
double r705382 = r705378 / r705381;
double r705383 = tan(r705382);
double r705384 = sin(r705382);
double r705385 = r705383 / r705384;
double r705386 = 2.388236677338849;
bool r705387 = r705385 <= r705386;
double r705388 = cos(r705382);
double r705389 = exp(r705388);
double r705390 = log(r705389);
double r705391 = r705384 * r705390;
double r705392 = r705384 / r705391;
double r705393 = 3.0;
double r705394 = pow(r705392, r705393);
double r705395 = cbrt(r705394);
double r705396 = 1.0;
double r705397 = r705387 ? r705395 : r705396;
return r705397;
}




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