\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;x \le -0.0343675887053717:\\
\;\;\;\;\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}\\
\mathbf{elif}\;x \le 0.03216989433394439:\\
\;\;\;\;\left(\left(x \cdot x\right) \cdot \frac{9}{40} - \frac{27}{2800} \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right) - \frac{1}{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}\\
\end{array}double f(double x) {
double r1018628 = x;
double r1018629 = sin(r1018628);
double r1018630 = r1018628 - r1018629;
double r1018631 = tan(r1018628);
double r1018632 = r1018628 - r1018631;
double r1018633 = r1018630 / r1018632;
return r1018633;
}
double f(double x) {
double r1018634 = x;
double r1018635 = -0.0343675887053717;
bool r1018636 = r1018634 <= r1018635;
double r1018637 = tan(r1018634);
double r1018638 = r1018634 - r1018637;
double r1018639 = r1018634 / r1018638;
double r1018640 = sin(r1018634);
double r1018641 = r1018640 / r1018638;
double r1018642 = r1018639 - r1018641;
double r1018643 = 0.03216989433394439;
bool r1018644 = r1018634 <= r1018643;
double r1018645 = r1018634 * r1018634;
double r1018646 = 0.225;
double r1018647 = r1018645 * r1018646;
double r1018648 = 0.009642857142857142;
double r1018649 = r1018645 * r1018645;
double r1018650 = r1018648 * r1018649;
double r1018651 = r1018647 - r1018650;
double r1018652 = 0.5;
double r1018653 = r1018651 - r1018652;
double r1018654 = r1018644 ? r1018653 : r1018642;
double r1018655 = r1018636 ? r1018642 : r1018654;
return r1018655;
}



Bits error versus x
Results
if x < -0.0343675887053717 or 0.03216989433394439 < x Initial program 0.0
rmApplied div-sub0.0
if -0.0343675887053717 < x < 0.03216989433394439Initial program 62.7
Taylor expanded around 0 0.0
Simplified0.0
rmApplied associate--r+0.0
Final simplification0.0
herbie shell --seed 2019112
(FPCore (x)
:name "sintan (problem 3.4.5)"
(/ (- x (sin x)) (- x (tan x))))