\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;x \le -2.421622929505549137729758513160049915314 \lor \neg \left(x \le 2.430594957022066626706191527773626148701\right):\\
\;\;\;\;\left(\frac{\sin x}{x \cdot \cos x} + \left(\frac{{\left(\sin x\right)}^{2}}{{x}^{2} \cdot {\left(\cos x\right)}^{2}} + 1\right)\right) - \left(\frac{\sin x}{x} + \frac{{\left(\sin x\right)}^{2}}{{x}^{2} \cdot \cos x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{9}{40} \cdot {x}^{2} - \mathsf{fma}\left(\frac{27}{2800}, {x}^{4}, \frac{1}{2}\right)\\
\end{array}double f(double x) {
double r24003 = x;
double r24004 = sin(r24003);
double r24005 = r24003 - r24004;
double r24006 = tan(r24003);
double r24007 = r24003 - r24006;
double r24008 = r24005 / r24007;
return r24008;
}
double f(double x) {
double r24009 = x;
double r24010 = -2.421622929505549;
bool r24011 = r24009 <= r24010;
double r24012 = 2.4305949570220666;
bool r24013 = r24009 <= r24012;
double r24014 = !r24013;
bool r24015 = r24011 || r24014;
double r24016 = sin(r24009);
double r24017 = cos(r24009);
double r24018 = r24009 * r24017;
double r24019 = r24016 / r24018;
double r24020 = 2.0;
double r24021 = pow(r24016, r24020);
double r24022 = pow(r24009, r24020);
double r24023 = pow(r24017, r24020);
double r24024 = r24022 * r24023;
double r24025 = r24021 / r24024;
double r24026 = 1.0;
double r24027 = r24025 + r24026;
double r24028 = r24019 + r24027;
double r24029 = r24016 / r24009;
double r24030 = r24022 * r24017;
double r24031 = r24021 / r24030;
double r24032 = r24029 + r24031;
double r24033 = r24028 - r24032;
double r24034 = 0.225;
double r24035 = r24034 * r24022;
double r24036 = 0.009642857142857142;
double r24037 = 4.0;
double r24038 = pow(r24009, r24037);
double r24039 = 0.5;
double r24040 = fma(r24036, r24038, r24039);
double r24041 = r24035 - r24040;
double r24042 = r24015 ? r24033 : r24041;
return r24042;
}



Bits error versus x
if x < -2.421622929505549 or 2.4305949570220666 < x Initial program 0.0
Taylor expanded around inf 0.4
if -2.421622929505549 < x < 2.4305949570220666Initial program 62.8
Taylor expanded around 0 0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019322 +o rules:numerics
(FPCore (x)
:name "sintan (problem 3.4.5)"
:precision binary64
(/ (- x (sin x)) (- x (tan x))))