\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;x \le -0.02581010450665607:\\
\;\;\;\;\log \left(e^{\frac{x - \sin x}{x - \tan x}}\right)\\
\mathbf{elif}\;x \le 2.433269626118002:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(\frac{9}{40} - \left(x \cdot x\right) \cdot \frac{27}{2800}\right) - \frac{1}{2}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\frac{\sin x}{x}}{x}, \frac{\sin x}{\cos x \cdot \cos x}, \frac{\sin x}{\cos x \cdot x} - \mathsf{fma}\left(\frac{\frac{\sin x}{x}}{x}, \frac{\sin x}{\cos x}, \frac{\sin x}{x}\right)\right) + 1\\
\end{array}double f(double x) {
double r690249 = x;
double r690250 = sin(r690249);
double r690251 = r690249 - r690250;
double r690252 = tan(r690249);
double r690253 = r690249 - r690252;
double r690254 = r690251 / r690253;
return r690254;
}
double f(double x) {
double r690255 = x;
double r690256 = -0.02581010450665607;
bool r690257 = r690255 <= r690256;
double r690258 = sin(r690255);
double r690259 = r690255 - r690258;
double r690260 = tan(r690255);
double r690261 = r690255 - r690260;
double r690262 = r690259 / r690261;
double r690263 = exp(r690262);
double r690264 = log(r690263);
double r690265 = 2.433269626118002;
bool r690266 = r690255 <= r690265;
double r690267 = r690255 * r690255;
double r690268 = 0.225;
double r690269 = 0.009642857142857142;
double r690270 = r690267 * r690269;
double r690271 = r690268 - r690270;
double r690272 = r690267 * r690271;
double r690273 = 0.5;
double r690274 = r690272 - r690273;
double r690275 = r690258 / r690255;
double r690276 = r690275 / r690255;
double r690277 = cos(r690255);
double r690278 = r690277 * r690277;
double r690279 = r690258 / r690278;
double r690280 = r690277 * r690255;
double r690281 = r690258 / r690280;
double r690282 = r690258 / r690277;
double r690283 = fma(r690276, r690282, r690275);
double r690284 = r690281 - r690283;
double r690285 = fma(r690276, r690279, r690284);
double r690286 = 1.0;
double r690287 = r690285 + r690286;
double r690288 = r690266 ? r690274 : r690287;
double r690289 = r690257 ? r690264 : r690288;
return r690289;
}



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