\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;x \le -0.0654189940460499:\\
\;\;\;\;\frac{x}{x - \tan x} - \log \left(e^{\frac{\sin x}{x - \tan x}}\right)\\
\mathbf{elif}\;x \le 0.06331538098159631:\\
\;\;\;\;\left(\frac{-1}{2} + x \cdot \left(x \cdot \frac{9}{40}\right)\right) + \frac{-27}{2800} \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\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 r863456 = x;
double r863457 = sin(r863456);
double r863458 = r863456 - r863457;
double r863459 = tan(r863456);
double r863460 = r863456 - r863459;
double r863461 = r863458 / r863460;
return r863461;
}
double f(double x) {
double r863462 = x;
double r863463 = -0.0654189940460499;
bool r863464 = r863462 <= r863463;
double r863465 = tan(r863462);
double r863466 = r863462 - r863465;
double r863467 = r863462 / r863466;
double r863468 = sin(r863462);
double r863469 = r863468 / r863466;
double r863470 = exp(r863469);
double r863471 = log(r863470);
double r863472 = r863467 - r863471;
double r863473 = 0.06331538098159631;
bool r863474 = r863462 <= r863473;
double r863475 = -0.5;
double r863476 = 0.225;
double r863477 = r863462 * r863476;
double r863478 = r863462 * r863477;
double r863479 = r863475 + r863478;
double r863480 = -0.009642857142857142;
double r863481 = r863462 * r863462;
double r863482 = r863481 * r863481;
double r863483 = r863480 * r863482;
double r863484 = r863479 + r863483;
double r863485 = r863474 ? r863484 : r863472;
double r863486 = r863464 ? r863472 : r863485;
return r863486;
}



Bits error versus x
Results
if x < -0.0654189940460499 or 0.06331538098159631 < x Initial program 0.0
rmApplied div-sub0.0
rmApplied add-log-exp0.1
if -0.0654189940460499 < x < 0.06331538098159631Initial program 62.6
Taylor expanded around 0 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019158
(FPCore (x)
:name "sintan (problem 3.4.5)"
(/ (- x (sin x)) (- x (tan x))))