\frac{\tan \left(\frac{x}{y \cdot 2}\right)}{\sin \left(\frac{x}{y \cdot 2}\right)}1
double f(double x, double y) {
double r613639 = x;
double r613640 = y;
double r613641 = 2.0;
double r613642 = r613640 * r613641;
double r613643 = r613639 / r613642;
double r613644 = tan(r613643);
double r613645 = sin(r613643);
double r613646 = r613644 / r613645;
return r613646;
}
double f(double __attribute__((unused)) x, double __attribute__((unused)) y) {
double r613647 = 1.0;
return r613647;
}




Bits error versus x




Bits error versus y
Results
| Original | 35.7 |
|---|---|
| Target | 28.7 |
| Herbie | 28.4 |
Initial program 35.7
Taylor expanded around 0 28.4
Final simplification28.4
herbie shell --seed 2020001 +o rules:numerics
(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)))))