\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;x \le -0.029158977316943849:\\
\;\;\;\;\log \left(e^{\frac{\frac{{\left(\frac{x}{x - \tan x}\right)}^{6} - {\left(\frac{\sin x}{x - \tan x}\right)}^{6}}{{\left(\frac{x}{x - \tan x}\right)}^{3} + {\left(\frac{\sin x}{x - \tan x}\right)}^{3}}}{\frac{x}{x - \tan x} \cdot \frac{x}{x - \tan x} + \frac{\sin x}{x - \tan x} \cdot \left(\frac{x}{x - \tan x} + \frac{\sin x}{x - \tan x}\right)}}\right)\\
\mathbf{elif}\;x \le 0.028578832745905277:\\
\;\;\;\;\frac{9}{40} \cdot {x}^{2} - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left(e^{\frac{{\left(\frac{x}{x - \tan x}\right)}^{3} - {\left(\frac{\sin x}{x - \tan x}\right)}^{3}}{\frac{x}{x - \tan x} \cdot \frac{x}{x - \tan x} + \frac{\sin x}{x - \tan x} \cdot \left(\frac{x}{x - \tan x} + \frac{\sin x}{x - \tan x}\right)}}\right)\\
\end{array}double f(double x) {
double r18039 = x;
double r18040 = sin(r18039);
double r18041 = r18039 - r18040;
double r18042 = tan(r18039);
double r18043 = r18039 - r18042;
double r18044 = r18041 / r18043;
return r18044;
}
double f(double x) {
double r18045 = x;
double r18046 = -0.02915897731694385;
bool r18047 = r18045 <= r18046;
double r18048 = tan(r18045);
double r18049 = r18045 - r18048;
double r18050 = r18045 / r18049;
double r18051 = 6.0;
double r18052 = pow(r18050, r18051);
double r18053 = sin(r18045);
double r18054 = r18053 / r18049;
double r18055 = pow(r18054, r18051);
double r18056 = r18052 - r18055;
double r18057 = 3.0;
double r18058 = pow(r18050, r18057);
double r18059 = pow(r18054, r18057);
double r18060 = r18058 + r18059;
double r18061 = r18056 / r18060;
double r18062 = r18050 * r18050;
double r18063 = r18050 + r18054;
double r18064 = r18054 * r18063;
double r18065 = r18062 + r18064;
double r18066 = r18061 / r18065;
double r18067 = exp(r18066);
double r18068 = log(r18067);
double r18069 = 0.028578832745905277;
bool r18070 = r18045 <= r18069;
double r18071 = 0.225;
double r18072 = 2.0;
double r18073 = pow(r18045, r18072);
double r18074 = r18071 * r18073;
double r18075 = 0.009642857142857142;
double r18076 = 4.0;
double r18077 = pow(r18045, r18076);
double r18078 = r18075 * r18077;
double r18079 = 0.5;
double r18080 = r18078 + r18079;
double r18081 = r18074 - r18080;
double r18082 = r18058 - r18059;
double r18083 = r18082 / r18065;
double r18084 = exp(r18083);
double r18085 = log(r18084);
double r18086 = r18070 ? r18081 : r18085;
double r18087 = r18047 ? r18068 : r18086;
return r18087;
}



Bits error versus x
Results
if x < -0.02915897731694385Initial program 0.1
rmApplied div-sub0.1
rmApplied add-log-exp0.2
Applied add-log-exp0.2
Applied diff-log0.2
Simplified0.1
rmApplied flip3--0.1
Simplified0.1
rmApplied flip--0.1
Simplified0.1
if -0.02915897731694385 < x < 0.028578832745905277Initial program 63.1
Taylor expanded around 0 0.0
if 0.028578832745905277 < x Initial program 0.0
rmApplied div-sub0.0
rmApplied add-log-exp0.1
Applied add-log-exp0.1
Applied diff-log0.1
Simplified0.0
rmApplied flip3--0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020042
(FPCore (x)
:name "sintan (problem 3.4.5)"
:precision binary64
(/ (- x (sin x)) (- x (tan x))))