\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;x \le -0.02464141707269403:\\
\;\;\;\;\mathsf{expm1}\left(\left(\mathsf{log1p}\left(\left(\frac{x - \sin x}{x - \tan x}\right)\right)\right)\right)\\
\mathbf{elif}\;x \le 0.02782498439406133:\\
\;\;\;\;\frac{-27}{2800} \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) + \mathsf{fma}\left(\frac{9}{40}, \left(x \cdot x\right), \frac{-1}{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{expm1}\left(\left(\mathsf{log1p}\left(\left(\frac{x - \sin x}{x - \tan x}\right)\right)\right)\right)\\
\end{array}double f(double x) {
double r635897 = x;
double r635898 = sin(r635897);
double r635899 = r635897 - r635898;
double r635900 = tan(r635897);
double r635901 = r635897 - r635900;
double r635902 = r635899 / r635901;
return r635902;
}
double f(double x) {
double r635903 = x;
double r635904 = -0.02464141707269403;
bool r635905 = r635903 <= r635904;
double r635906 = sin(r635903);
double r635907 = r635903 - r635906;
double r635908 = tan(r635903);
double r635909 = r635903 - r635908;
double r635910 = r635907 / r635909;
double r635911 = log1p(r635910);
double r635912 = expm1(r635911);
double r635913 = 0.02782498439406133;
bool r635914 = r635903 <= r635913;
double r635915 = -0.009642857142857142;
double r635916 = r635903 * r635903;
double r635917 = r635916 * r635916;
double r635918 = r635915 * r635917;
double r635919 = 0.225;
double r635920 = -0.5;
double r635921 = fma(r635919, r635916, r635920);
double r635922 = r635918 + r635921;
double r635923 = r635914 ? r635922 : r635912;
double r635924 = r635905 ? r635912 : r635923;
return r635924;
}



Bits error versus x
if x < -0.02464141707269403 or 0.02782498439406133 < x Initial program 0.1
rmApplied expm1-log1p-u0.1
rmApplied div-inv0.1
rmApplied expm1-log1p-u0.1
Simplified0.1
if -0.02464141707269403 < x < 0.02782498439406133Initial program 62.9
rmApplied expm1-log1p-u62.9
rmApplied div-inv62.9
Taylor expanded around 0 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019132 +o rules:numerics
(FPCore (x)
:name "sintan (problem 3.4.5)"
(/ (- x (sin x)) (- x (tan x))))