\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;x \le -2.607460140836350248605413071345537900925:\\
\;\;\;\;\left(1 + \left(\left(\frac{\frac{\sin x}{x}}{\cos x} + \frac{\frac{\sin x}{x} \cdot \frac{\sin x}{x}}{\cos x \cdot \cos x}\right) - \frac{\sin x}{x}\right)\right) - \frac{\frac{\sin x}{x} \cdot \frac{\sin x}{x}}{\cos x}\\
\mathbf{elif}\;x \le 14.28171286865168099211587104946374893188:\\
\;\;\;\;\log \left(1 + \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, \frac{9}{40}, 1\right), e^{\frac{-1}{2}}, \mathsf{fma}\left(\left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot e^{\frac{-1}{2}}, \frac{351}{22400}, -1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \left(\left(\frac{\frac{\sin x}{x}}{\cos x} + \frac{\frac{\sin x}{x} \cdot \frac{\sin x}{x}}{\cos x \cdot \cos x}\right) - \frac{\sin x}{x}\right)\right) - \frac{\frac{\sin x}{x} \cdot \frac{\sin x}{x}}{\cos x}\\
\end{array}double f(double x) {
double r709398 = x;
double r709399 = sin(r709398);
double r709400 = r709398 - r709399;
double r709401 = tan(r709398);
double r709402 = r709398 - r709401;
double r709403 = r709400 / r709402;
return r709403;
}
double f(double x) {
double r709404 = x;
double r709405 = -2.6074601408363502;
bool r709406 = r709404 <= r709405;
double r709407 = 1.0;
double r709408 = sin(r709404);
double r709409 = r709408 / r709404;
double r709410 = cos(r709404);
double r709411 = r709409 / r709410;
double r709412 = r709409 * r709409;
double r709413 = r709410 * r709410;
double r709414 = r709412 / r709413;
double r709415 = r709411 + r709414;
double r709416 = r709415 - r709409;
double r709417 = r709407 + r709416;
double r709418 = r709412 / r709410;
double r709419 = r709417 - r709418;
double r709420 = 14.281712868651681;
bool r709421 = r709404 <= r709420;
double r709422 = r709404 * r709404;
double r709423 = 0.225;
double r709424 = fma(r709422, r709423, r709407);
double r709425 = -0.5;
double r709426 = exp(r709425);
double r709427 = r709422 * r709422;
double r709428 = r709427 * r709426;
double r709429 = 0.015669642857142858;
double r709430 = -1.0;
double r709431 = fma(r709428, r709429, r709430);
double r709432 = fma(r709424, r709426, r709431);
double r709433 = r709407 + r709432;
double r709434 = log(r709433);
double r709435 = r709421 ? r709434 : r709419;
double r709436 = r709406 ? r709419 : r709435;
return r709436;
}



Bits error versus x
if x < -2.6074601408363502 or 14.281712868651681 < x Initial program 0.0
rmApplied log1p-expm1-u0.0
Taylor expanded around inf 0.3
Simplified0.3
if -2.6074601408363502 < x < 14.281712868651681Initial program 62.7
rmApplied log1p-expm1-u62.7
Taylor expanded around 0 0.3
Simplified0.3
rmApplied log1p-udef0.3
Final simplification0.3
herbie shell --seed 2019179 +o rules:numerics
(FPCore (x)
:name "sintan (problem 3.4.5)"
(/ (- x (sin x)) (- x (tan x))))