\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 r737140 = x;
double r737141 = y;
double r737142 = 2.0;
double r737143 = r737141 * r737142;
double r737144 = r737140 / r737143;
double r737145 = tan(r737144);
double r737146 = sin(r737144);
double r737147 = r737145 / r737146;
return r737147;
}
double f(double x, double y) {
double r737148 = x;
double r737149 = y;
double r737150 = 2.0;
double r737151 = r737149 * r737150;
double r737152 = r737148 / r737151;
double r737153 = tan(r737152);
double r737154 = sin(r737152);
double r737155 = r737153 / r737154;
double r737156 = 1.0127414878616747;
bool r737157 = r737155 <= r737156;
double r737158 = 3.0;
double r737159 = pow(r737155, r737158);
double r737160 = cbrt(r737159);
double r737161 = pow(r737160, r737158);
double r737162 = cbrt(r737161);
double r737163 = pow(r737162, r737158);
double r737164 = cbrt(r737163);
double r737165 = 1.0;
double r737166 = r737157 ? r737164 : r737165;
return r737166;
}




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