\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;x \le -0.029470951698575748:\\
\;\;\;\;\log \left(e^{\frac{x - \sin x}{x - \tan x}}\right)\\
\mathbf{elif}\;x \le 0.06477336993094537:\\
\;\;\;\;\frac{9}{40} \cdot \left(x \cdot x\right) - \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}{x - \tan x} - \log \left(e^{\frac{\sin x}{x - \tan x}}\right)\\
\end{array}double f(double x) {
double r830414 = x;
double r830415 = sin(r830414);
double r830416 = r830414 - r830415;
double r830417 = tan(r830414);
double r830418 = r830414 - r830417;
double r830419 = r830416 / r830418;
return r830419;
}
double f(double x) {
double r830420 = x;
double r830421 = -0.029470951698575748;
bool r830422 = r830420 <= r830421;
double r830423 = sin(r830420);
double r830424 = r830420 - r830423;
double r830425 = tan(r830420);
double r830426 = r830420 - r830425;
double r830427 = r830424 / r830426;
double r830428 = exp(r830427);
double r830429 = log(r830428);
double r830430 = 0.06477336993094537;
bool r830431 = r830420 <= r830430;
double r830432 = 0.225;
double r830433 = r830420 * r830420;
double r830434 = r830432 * r830433;
double r830435 = 0.009642857142857142;
double r830436 = r830433 * r830433;
double r830437 = 0.5;
double r830438 = fma(r830435, r830436, r830437);
double r830439 = r830434 - r830438;
double r830440 = r830420 / r830426;
double r830441 = r830423 / r830426;
double r830442 = exp(r830441);
double r830443 = log(r830442);
double r830444 = r830440 - r830443;
double r830445 = r830431 ? r830439 : r830444;
double r830446 = r830422 ? r830429 : r830445;
return r830446;
}



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