\frac{\tan \left(\frac{x}{y \cdot 2}\right)}{\sin \left(\frac{x}{y \cdot 2}\right)}\begin{array}{l}
\mathbf{if}\;y \cdot 2 \le -1.57072877925321994 \cdot 10^{-145}:\\
\;\;\;\;\sqrt[3]{{\left(\frac{1}{\log \left(e^{\cos \left(\frac{x}{y \cdot 2}\right)}\right)}\right)}^{3}}\\
\mathbf{elif}\;y \cdot 2 \le 2.99395177104279672 \cdot 10^{-44}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\left(\frac{1}{\sqrt[3]{{\left(\cos \left(\frac{x}{y \cdot 2}\right)\right)}^{3}}}\right)}^{3}}\\
\end{array}double f(double x, double y) {
double r529652 = x;
double r529653 = y;
double r529654 = 2.0;
double r529655 = r529653 * r529654;
double r529656 = r529652 / r529655;
double r529657 = tan(r529656);
double r529658 = sin(r529656);
double r529659 = r529657 / r529658;
return r529659;
}
double f(double x, double y) {
double r529660 = y;
double r529661 = 2.0;
double r529662 = r529660 * r529661;
double r529663 = -1.57072877925322e-145;
bool r529664 = r529662 <= r529663;
double r529665 = 1.0;
double r529666 = x;
double r529667 = r529666 / r529662;
double r529668 = cos(r529667);
double r529669 = exp(r529668);
double r529670 = log(r529669);
double r529671 = r529665 / r529670;
double r529672 = 3.0;
double r529673 = pow(r529671, r529672);
double r529674 = cbrt(r529673);
double r529675 = 2.9939517710427967e-44;
bool r529676 = r529662 <= r529675;
double r529677 = 1.0;
double r529678 = pow(r529668, r529672);
double r529679 = cbrt(r529678);
double r529680 = r529665 / r529679;
double r529681 = pow(r529680, r529672);
double r529682 = cbrt(r529681);
double r529683 = r529676 ? r529677 : r529682;
double r529684 = r529664 ? r529674 : r529683;
return r529684;
}




Bits error versus x




Bits error versus y
Results
| Original | 36.3 |
|---|---|
| Target | 29.5 |
| Herbie | 28.5 |
if (* y 2.0) < -1.57072877925322e-145Initial program 30.4
rmApplied tan-quot30.4
Applied associate-/l/30.4
rmApplied add-cbrt-cube30.4
Applied add-cbrt-cube50.0
Applied cbrt-unprod50.0
Applied add-cbrt-cube49.8
Applied cbrt-undiv49.8
Simplified20.7
rmApplied add-log-exp20.7
if -1.57072877925322e-145 < (* y 2.0) < 2.9939517710427967e-44Initial program 48.3
Taylor expanded around 0 46.9
if 2.9939517710427967e-44 < (* y 2.0) Initial program 28.6
rmApplied tan-quot28.6
Applied associate-/l/28.6
rmApplied add-cbrt-cube28.6
Applied add-cbrt-cube50.8
Applied cbrt-unprod50.8
Applied add-cbrt-cube50.4
Applied cbrt-undiv50.4
Simplified15.5
rmApplied add-cbrt-cube15.5
Simplified15.5
Final simplification28.5
herbie shell --seed 2020035
(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)))))