\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;x \le -0.025621427997812182:\\
\;\;\;\;\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}\\
\mathbf{elif}\;x \le 0.03210649578243009:\\
\;\;\;\;\frac{-1}{2} + \left(x \cdot x\right) \cdot \left(\frac{9}{40} - \left(x \cdot x\right) \cdot \frac{27}{2800}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}\\
\end{array}double f(double x) {
double r846016 = x;
double r846017 = sin(r846016);
double r846018 = r846016 - r846017;
double r846019 = tan(r846016);
double r846020 = r846016 - r846019;
double r846021 = r846018 / r846020;
return r846021;
}
double f(double x) {
double r846022 = x;
double r846023 = -0.025621427997812182;
bool r846024 = r846022 <= r846023;
double r846025 = tan(r846022);
double r846026 = r846022 - r846025;
double r846027 = r846022 / r846026;
double r846028 = sin(r846022);
double r846029 = r846028 / r846026;
double r846030 = r846027 - r846029;
double r846031 = 0.03210649578243009;
bool r846032 = r846022 <= r846031;
double r846033 = -0.5;
double r846034 = r846022 * r846022;
double r846035 = 0.225;
double r846036 = 0.009642857142857142;
double r846037 = r846034 * r846036;
double r846038 = r846035 - r846037;
double r846039 = r846034 * r846038;
double r846040 = r846033 + r846039;
double r846041 = r846032 ? r846040 : r846030;
double r846042 = r846024 ? r846030 : r846041;
return r846042;
}



Bits error versus x
Results
if x < -0.025621427997812182 or 0.03210649578243009 < x Initial program 0.0
rmApplied div-sub0.0
if -0.025621427997812182 < x < 0.03210649578243009Initial program 62.8
rmApplied div-sub62.7
Taylor expanded around 0 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019152
(FPCore (x)
:name "sintan (problem 3.4.5)"
(/ (- x (sin x)) (- x (tan x))))