\frac{\tan \left(\frac{x}{y \cdot 2.0}\right)}{\sin \left(\frac{x}{y \cdot 2.0}\right)}\begin{array}{l}
\mathbf{if}\;\frac{x}{2.0 \cdot y} \le 4.3945246018946 \cdot 10^{-310}:\\
\;\;\;\;1.0\\
\mathbf{elif}\;\frac{x}{2.0 \cdot y} \le 5.725300019950944 \cdot 10^{+237}:\\
\;\;\;\;\frac{\sin \left(\frac{x}{2.0 \cdot y}\right)}{\sin \left(\frac{x}{2.0 \cdot y}\right) \cdot \cos \left(\frac{x}{2.0 \cdot y}\right)}\\
\mathbf{else}:\\
\;\;\;\;1.0\\
\end{array}double f(double x, double y) {
double r31380513 = x;
double r31380514 = y;
double r31380515 = 2.0;
double r31380516 = r31380514 * r31380515;
double r31380517 = r31380513 / r31380516;
double r31380518 = tan(r31380517);
double r31380519 = sin(r31380517);
double r31380520 = r31380518 / r31380519;
return r31380520;
}
double f(double x, double y) {
double r31380521 = x;
double r31380522 = 2.0;
double r31380523 = y;
double r31380524 = r31380522 * r31380523;
double r31380525 = r31380521 / r31380524;
double r31380526 = 4.3945246018946e-310;
bool r31380527 = r31380525 <= r31380526;
double r31380528 = 1.0;
double r31380529 = 5.725300019950944e+237;
bool r31380530 = r31380525 <= r31380529;
double r31380531 = sin(r31380525);
double r31380532 = cos(r31380525);
double r31380533 = r31380531 * r31380532;
double r31380534 = r31380531 / r31380533;
double r31380535 = r31380530 ? r31380534 : r31380528;
double r31380536 = r31380527 ? r31380528 : r31380535;
return r31380536;
}




Bits error versus x




Bits error versus y
Results
| Original | 35.3 |
|---|---|
| Target | 29.4 |
| Herbie | 28.4 |
if (/ x (* y 2.0)) < 4.3945246018946e-310 or 5.725300019950944e+237 < (/ x (* y 2.0)) Initial program 41.0
Taylor expanded around 0 30.5
if 4.3945246018946e-310 < (/ x (* y 2.0)) < 5.725300019950944e+237Initial program 24.5
rmApplied tan-quot24.5
rmApplied associate-/l/24.5
Final simplification28.4
herbie shell --seed 2019162
(FPCore (x y)
:name "Diagrams.TwoD.Layout.CirclePacking:approxRadius from diagrams-contrib-1.3.0.5"
:herbie-target
(if (< y -1.2303690911306994e+114) 1.0 (if (< y -9.102852406811914e-222) (/ (sin (/ x (* y 2.0))) (* (sin (/ x (* y 2.0))) (log (exp (cos (/ x (* y 2.0))))))) 1.0))
(/ (tan (/ x (* y 2.0))) (sin (/ x (* y 2.0)))))