\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;x \le -0.027836888459983777:\\
\;\;\;\;\log \left(e^{\frac{x - \sin x}{x - \tan x}}\right)\\
\mathbf{elif}\;x \le 0.02825639784178301:\\
\;\;\;\;\frac{-1}{2} + \left(\left(x \cdot x\right) \cdot \frac{9}{40} - \left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \frac{27}{2800}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left(e^{\frac{x - \sin x}{x - \tan x}}\right)\\
\end{array}double f(double x) {
double r763846 = x;
double r763847 = sin(r763846);
double r763848 = r763846 - r763847;
double r763849 = tan(r763846);
double r763850 = r763846 - r763849;
double r763851 = r763848 / r763850;
return r763851;
}
double f(double x) {
double r763852 = x;
double r763853 = -0.027836888459983777;
bool r763854 = r763852 <= r763853;
double r763855 = sin(r763852);
double r763856 = r763852 - r763855;
double r763857 = tan(r763852);
double r763858 = r763852 - r763857;
double r763859 = r763856 / r763858;
double r763860 = exp(r763859);
double r763861 = log(r763860);
double r763862 = 0.02825639784178301;
bool r763863 = r763852 <= r763862;
double r763864 = -0.5;
double r763865 = r763852 * r763852;
double r763866 = 0.225;
double r763867 = r763865 * r763866;
double r763868 = 0.009642857142857142;
double r763869 = r763865 * r763868;
double r763870 = r763865 * r763869;
double r763871 = r763867 - r763870;
double r763872 = r763864 + r763871;
double r763873 = r763863 ? r763872 : r763861;
double r763874 = r763854 ? r763861 : r763873;
return r763874;
}



Bits error versus x
Results
if x < -0.027836888459983777 or 0.02825639784178301 < x Initial program 0.1
rmApplied add-log-exp0.1
if -0.027836888459983777 < x < 0.02825639784178301Initial program 62.8
Taylor expanded around 0 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019163
(FPCore (x)
:name "sintan (problem 3.4.5)"
(/ (- x (sin x)) (- x (tan x))))