\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 1.012741487861675:\\
\;\;\;\;\sqrt[3]{{\left(\sqrt[3]{{\left(\sqrt[3]{{\left(\frac{\tan \left(\frac{x}{y \cdot 2}\right)}{\sin \left(\frac{x}{y \cdot 2}\right)}\right)}^{3}}\right)}^{3}}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}double f(double x, double y) {
double r1378 = x;
double r1379 = y;
double r1380 = 2.0;
double r1381 = r1379 * r1380;
double r1382 = r1378 / r1381;
double r1383 = tan(r1382);
double r1384 = sin(r1382);
double r1385 = r1383 / r1384;
return r1385;
}
double f(double x, double y) {
double r1386 = x;
double r1387 = y;
double r1388 = 2.0;
double r1389 = r1387 * r1388;
double r1390 = r1386 / r1389;
double r1391 = tan(r1390);
double r1392 = sin(r1390);
double r1393 = r1391 / r1392;
double r1394 = 1.0127414878616747;
bool r1395 = r1393 <= r1394;
double r1396 = 3.0;
double r1397 = pow(r1393, r1396);
double r1398 = cbrt(r1397);
double r1399 = pow(r1398, r1396);
double r1400 = cbrt(r1399);
double r1401 = pow(r1400, r1396);
double r1402 = cbrt(r1401);
double r1403 = 1.0;
double r1404 = r1395 ? r1402 : r1403;
return r1404;
}




Bits error versus x




Bits error versus y
Results
| Original | 35.5 |
|---|---|
| Target | 29.0 |
| Herbie | 28.0 |
if (/ (tan (/ x (* y 2.0))) (sin (/ x (* y 2.0)))) < 1.0127414878616747Initial program 19.0
rmApplied add-cbrt-cube43.6
Applied add-cbrt-cube43.2
Applied cbrt-undiv43.2
Simplified19.0
rmApplied add-cbrt-cube43.4
Applied add-cbrt-cube43.2
Applied cbrt-undiv43.2
Simplified19.0
rmApplied add-cbrt-cube43.4
Applied add-cbrt-cube43.2
Applied cbrt-undiv43.2
Simplified19.0
if 1.0127414878616747 < (/ (tan (/ x (* y 2.0))) (sin (/ x (* y 2.0)))) Initial program 60.1
Taylor expanded around 0 41.4
Final simplification28.0
herbie shell --seed 2020025
(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)))))