\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;x \le -0.027836888459983777:\\
\;\;\;\;\log \left(e^{\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}}\right)\\
\mathbf{elif}\;x \le 0.02825639784178301:\\
\;\;\;\;\left(x \cdot x\right) \cdot \frac{9}{40} - \mathsf{fma}\left(\frac{27}{2800}, \left(x \cdot x\right) \cdot \left(x \cdot x\right), \frac{1}{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x - \sin x}{x - \tan x}\\
\end{array}double f(double x) {
double r916055 = x;
double r916056 = sin(r916055);
double r916057 = r916055 - r916056;
double r916058 = tan(r916055);
double r916059 = r916055 - r916058;
double r916060 = r916057 / r916059;
return r916060;
}
double f(double x) {
double r916061 = x;
double r916062 = -0.027836888459983777;
bool r916063 = r916061 <= r916062;
double r916064 = tan(r916061);
double r916065 = r916061 - r916064;
double r916066 = r916061 / r916065;
double r916067 = sin(r916061);
double r916068 = r916067 / r916065;
double r916069 = r916066 - r916068;
double r916070 = exp(r916069);
double r916071 = log(r916070);
double r916072 = 0.02825639784178301;
bool r916073 = r916061 <= r916072;
double r916074 = r916061 * r916061;
double r916075 = 0.225;
double r916076 = r916074 * r916075;
double r916077 = 0.009642857142857142;
double r916078 = r916074 * r916074;
double r916079 = 0.5;
double r916080 = fma(r916077, r916078, r916079);
double r916081 = r916076 - r916080;
double r916082 = r916061 - r916067;
double r916083 = r916082 / r916065;
double r916084 = r916073 ? r916081 : r916083;
double r916085 = r916063 ? r916071 : r916084;
return r916085;
}



Bits error versus x
if x < -0.027836888459983777Initial program 0.1
rmApplied div-sub0.1
rmApplied add-log-exp0.1
Applied add-log-exp0.1
Applied diff-log0.1
Simplified0.1
if -0.027836888459983777 < x < 0.02825639784178301Initial program 62.8
Taylor expanded around 0 0.0
Simplified0.0
if 0.02825639784178301 < x Initial program 0.0
Final simplification0.0
herbie shell --seed 2019163 +o rules:numerics
(FPCore (x)
:name "sintan (problem 3.4.5)"
(/ (- x (sin x)) (- x (tan x))))