\frac{\tan \left(\frac{x}{y \cdot 2}\right)}{\sin \left(\frac{x}{y \cdot 2}\right)}\sqrt[3]{{\left(\frac{1}{\cos \left(\frac{1}{y} \cdot \frac{x}{2}\right)}\right)}^{3}}double f(double x, double y) {
double r589926 = x;
double r589927 = y;
double r589928 = 2.0;
double r589929 = r589927 * r589928;
double r589930 = r589926 / r589929;
double r589931 = tan(r589930);
double r589932 = sin(r589930);
double r589933 = r589931 / r589932;
return r589933;
}
double f(double x, double y) {
double r589934 = 1.0;
double r589935 = y;
double r589936 = r589934 / r589935;
double r589937 = x;
double r589938 = 2.0;
double r589939 = r589937 / r589938;
double r589940 = r589936 * r589939;
double r589941 = cos(r589940);
double r589942 = r589934 / r589941;
double r589943 = 3.0;
double r589944 = pow(r589942, r589943);
double r589945 = cbrt(r589944);
return r589945;
}




Bits error versus x




Bits error versus y
Results
| Original | 36.3 |
|---|---|
| Target | 29.3 |
| Herbie | 29.0 |
Initial program 36.3
rmApplied tan-quot36.3
Applied associate-/l/36.3
rmApplied add-cbrt-cube36.3
Applied add-cbrt-cube50.4
Applied cbrt-unprod50.4
Applied add-cbrt-cube50.2
Applied cbrt-undiv50.2
Simplified28.9
rmApplied *-un-lft-identity28.9
Applied times-frac29.0
Final simplification29.0
herbie shell --seed 2020100
(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)))))