\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;x \le -0.0287527250874288:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{x - \sin x}{x - \tan x}\right)\right)\\
\mathbf{elif}\;x \le 0.029335377355220408:\\
\;\;\;\;\frac{-27}{2800} \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) + \mathsf{fma}\left(x \cdot x, \frac{9}{40}, \frac{-1}{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1}{\frac{x - \tan x}{x - \sin x}}\right)\right)\\
\end{array}double f(double x) {
double r802550 = x;
double r802551 = sin(r802550);
double r802552 = r802550 - r802551;
double r802553 = tan(r802550);
double r802554 = r802550 - r802553;
double r802555 = r802552 / r802554;
return r802555;
}
double f(double x) {
double r802556 = x;
double r802557 = -0.0287527250874288;
bool r802558 = r802556 <= r802557;
double r802559 = sin(r802556);
double r802560 = r802556 - r802559;
double r802561 = tan(r802556);
double r802562 = r802556 - r802561;
double r802563 = r802560 / r802562;
double r802564 = expm1(r802563);
double r802565 = log1p(r802564);
double r802566 = 0.029335377355220408;
bool r802567 = r802556 <= r802566;
double r802568 = -0.009642857142857142;
double r802569 = r802556 * r802556;
double r802570 = r802569 * r802569;
double r802571 = r802568 * r802570;
double r802572 = 0.225;
double r802573 = -0.5;
double r802574 = fma(r802569, r802572, r802573);
double r802575 = r802571 + r802574;
double r802576 = 1.0;
double r802577 = r802562 / r802560;
double r802578 = r802576 / r802577;
double r802579 = expm1(r802578);
double r802580 = log1p(r802579);
double r802581 = r802567 ? r802575 : r802580;
double r802582 = r802558 ? r802565 : r802581;
return r802582;
}



Bits error versus x
if x < -0.0287527250874288Initial program 0.0
rmApplied log1p-expm1-u0.0
if -0.0287527250874288 < x < 0.029335377355220408Initial program 62.7
Taylor expanded around 0 0.0
Simplified0.0
if 0.029335377355220408 < x Initial program 0.0
rmApplied log1p-expm1-u0.0
rmApplied clear-num0.1
Final simplification0.0
herbie shell --seed 2019162 +o rules:numerics
(FPCore (x)
:name "sintan (problem 3.4.5)"
(/ (- x (sin x)) (- x (tan x))))