\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;x \le -0.030916815840808982:\\
\;\;\;\;\log \left(e^{\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}}\right)\\
\mathbf{elif}\;x \le 0.032993602201721775:\\
\;\;\;\;x \cdot \left(\frac{9}{40} \cdot x\right) - \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \frac{27}{2800}\right) + \frac{1}{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left(e^{\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}}\right)\\
\end{array}double f(double x) {
double r749906 = x;
double r749907 = sin(r749906);
double r749908 = r749906 - r749907;
double r749909 = tan(r749906);
double r749910 = r749906 - r749909;
double r749911 = r749908 / r749910;
return r749911;
}
double f(double x) {
double r749912 = x;
double r749913 = -0.030916815840808982;
bool r749914 = r749912 <= r749913;
double r749915 = tan(r749912);
double r749916 = r749912 - r749915;
double r749917 = r749912 / r749916;
double r749918 = sin(r749912);
double r749919 = r749918 / r749916;
double r749920 = r749917 - r749919;
double r749921 = exp(r749920);
double r749922 = log(r749921);
double r749923 = 0.032993602201721775;
bool r749924 = r749912 <= r749923;
double r749925 = 0.225;
double r749926 = r749925 * r749912;
double r749927 = r749912 * r749926;
double r749928 = r749912 * r749912;
double r749929 = 0.009642857142857142;
double r749930 = r749928 * r749929;
double r749931 = r749928 * r749930;
double r749932 = 0.5;
double r749933 = r749931 + r749932;
double r749934 = r749927 - r749933;
double r749935 = r749924 ? r749934 : r749922;
double r749936 = r749914 ? r749922 : r749935;
return r749936;
}



Bits error versus x
Results
if x < -0.030916815840808982 or 0.032993602201721775 < x Initial 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.030916815840808982 < x < 0.032993602201721775Initial program 62.8
rmApplied div-sub62.7
Taylor expanded around 0 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019164
(FPCore (x)
:name "sintan (problem 3.4.5)"
(/ (- x (sin x)) (- x (tan x))))