\frac{\tan \left(\frac{x}{y \cdot 2}\right)}{\sin \left(\frac{x}{y \cdot 2}\right)}\frac{1}{\cos \left(\frac{x}{y \cdot 2}\right)}double f(double x, double y) {
double r402699 = x;
double r402700 = y;
double r402701 = 2.0;
double r402702 = r402700 * r402701;
double r402703 = r402699 / r402702;
double r402704 = tan(r402703);
double r402705 = sin(r402703);
double r402706 = r402704 / r402705;
return r402706;
}
double f(double x, double y) {
double r402707 = 1.0;
double r402708 = x;
double r402709 = y;
double r402710 = 2.0;
double r402711 = r402709 * r402710;
double r402712 = r402708 / r402711;
double r402713 = cos(r402712);
double r402714 = r402707 / r402713;
return r402714;
}




Bits error versus x




Bits error versus y
Results
| Original | 35.9 |
|---|---|
| Target | 29.3 |
| Herbie | 28.8 |
Initial program 35.9
rmApplied add-cbrt-cube50.7
Applied add-cbrt-cube50.5
Applied cbrt-undiv50.5
Simplified35.9
rmApplied tan-quot35.9
rmApplied *-un-lft-identity35.9
Applied *-un-lft-identity35.9
Applied times-frac35.9
Applied associate-/l*35.9
Simplified28.8
Final simplification28.8
herbie shell --seed 2019294
(FPCore (x y)
:name "Diagrams.TwoD.Layout.CirclePacking:approxRadius from diagrams-contrib-1.3.0.5"
:precision binary64
:herbie-target
(if (< y -1.23036909113069936e114) 1 (if (< y -9.1028524068119138e-222) (/ (sin (/ x (* y 2))) (* (sin (/ x (* y 2))) (log (exp (cos (/ x (* y 2))))))) 1))
(/ (tan (/ x (* y 2))) (sin (/ x (* y 2)))))