\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;x \le -0.037455433778870853:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{x - \sin x}{x - \tan x}\right)\right)\\
\mathbf{elif}\;x \le 0.038612806086461615:\\
\;\;\;\;\mathsf{log1p}\left(e^{\frac{-1}{2}} \cdot \left(\frac{9}{40} \cdot {x}^{2} + {x}^{4} \cdot \frac{351}{22400}\right) + \mathsf{expm1}\left(\frac{-1}{2}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x - \sin x}{x - \tan x}\\
\end{array}double f(double x) {
double r14542 = x;
double r14543 = sin(r14542);
double r14544 = r14542 - r14543;
double r14545 = tan(r14542);
double r14546 = r14542 - r14545;
double r14547 = r14544 / r14546;
return r14547;
}
double f(double x) {
double r14548 = x;
double r14549 = -0.03745543377887085;
bool r14550 = r14548 <= r14549;
double r14551 = sin(r14548);
double r14552 = r14548 - r14551;
double r14553 = tan(r14548);
double r14554 = r14548 - r14553;
double r14555 = r14552 / r14554;
double r14556 = expm1(r14555);
double r14557 = log1p(r14556);
double r14558 = 0.038612806086461615;
bool r14559 = r14548 <= r14558;
double r14560 = -0.5;
double r14561 = exp(r14560);
double r14562 = 0.225;
double r14563 = 2.0;
double r14564 = pow(r14548, r14563);
double r14565 = r14562 * r14564;
double r14566 = 4.0;
double r14567 = pow(r14548, r14566);
double r14568 = 0.015669642857142858;
double r14569 = r14567 * r14568;
double r14570 = r14565 + r14569;
double r14571 = r14561 * r14570;
double r14572 = expm1(r14560);
double r14573 = r14571 + r14572;
double r14574 = log1p(r14573);
double r14575 = r14559 ? r14574 : r14555;
double r14576 = r14550 ? r14557 : r14575;
return r14576;
}



Bits error versus x
Results
if x < -0.03745543377887085Initial program 0.1
rmApplied log1p-expm1-u0.1
if -0.03745543377887085 < x < 0.038612806086461615Initial program 63.1
rmApplied log1p-expm1-u63.1
Taylor expanded around 0 0.0
Simplified0.0
if 0.038612806086461615 < x Initial program 0.0
Final simplification0.0
herbie shell --seed 2020021 +o rules:numerics
(FPCore (x)
:name "sintan (problem 3.4.5)"
:precision binary64
(/ (- x (sin x)) (- x (tan x))))