\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;x \le -2.508948866519329:\\
\;\;\;\;\mathsf{fma}\left(\frac{\sin x}{\cos x \cdot \cos x}, \frac{\frac{\sin x}{x}}{x}, 1 + \log \left(e^{\frac{\frac{\sin x}{x}}{\cos x} - \mathsf{fma}\left(\frac{\frac{\sin x}{x}}{x}, \frac{\sin x}{\cos x}, \frac{\sin x}{x}\right)}\right)\right)\\
\mathbf{elif}\;x \le 2.4203399319729506:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, \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}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\sin x}{\cos x \cdot \cos x}, \frac{\frac{\sin x}{x}}{x}, 1 + \log \left(e^{\frac{\frac{\sin x}{x}}{\cos x} - \mathsf{fma}\left(\frac{\frac{\sin x}{x}}{x}, \frac{\sin x}{\cos x}, \frac{\sin x}{x}\right)}\right)\right)\\
\end{array}double f(double x) {
double r1009388 = x;
double r1009389 = sin(r1009388);
double r1009390 = r1009388 - r1009389;
double r1009391 = tan(r1009388);
double r1009392 = r1009388 - r1009391;
double r1009393 = r1009390 / r1009392;
return r1009393;
}
double f(double x) {
double r1009394 = x;
double r1009395 = -2.508948866519329;
bool r1009396 = r1009394 <= r1009395;
double r1009397 = sin(r1009394);
double r1009398 = cos(r1009394);
double r1009399 = r1009398 * r1009398;
double r1009400 = r1009397 / r1009399;
double r1009401 = r1009397 / r1009394;
double r1009402 = r1009401 / r1009394;
double r1009403 = 1.0;
double r1009404 = r1009401 / r1009398;
double r1009405 = r1009397 / r1009398;
double r1009406 = fma(r1009402, r1009405, r1009401);
double r1009407 = r1009404 - r1009406;
double r1009408 = exp(r1009407);
double r1009409 = log(r1009408);
double r1009410 = r1009403 + r1009409;
double r1009411 = fma(r1009400, r1009402, r1009410);
double r1009412 = 2.4203399319729506;
bool r1009413 = r1009394 <= r1009412;
double r1009414 = r1009394 * r1009394;
double r1009415 = 0.225;
double r1009416 = -0.009642857142857142;
double r1009417 = r1009414 * r1009414;
double r1009418 = r1009416 * r1009417;
double r1009419 = fma(r1009414, r1009415, r1009418);
double r1009420 = -0.5;
double r1009421 = r1009419 + r1009420;
double r1009422 = r1009413 ? r1009421 : r1009411;
double r1009423 = r1009396 ? r1009411 : r1009422;
return r1009423;
}



Bits error versus x
if x < -2.508948866519329 or 2.4203399319729506 < x Initial program 0.0
Taylor expanded around inf 0.3
Simplified0.3
rmApplied add-log-exp0.3
if -2.508948866519329 < x < 2.4203399319729506Initial program 62.6
Taylor expanded around 0 0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019165 +o rules:numerics
(FPCore (x)
:name "sintan (problem 3.4.5)"
(/ (- x (sin x)) (- x (tan x))))