\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;x \le -0.02697179057437607:\\
\;\;\;\;\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}\right)\right)\\
\mathbf{elif}\;x \le 0.029925645760154832:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, \frac{9}{40}, \frac{-1}{2}\right) + \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \frac{-27}{2800}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}\right)\right)\\
\end{array}double f(double x) {
double r1027428 = x;
double r1027429 = sin(r1027428);
double r1027430 = r1027428 - r1027429;
double r1027431 = tan(r1027428);
double r1027432 = r1027428 - r1027431;
double r1027433 = r1027430 / r1027432;
return r1027433;
}
double f(double x) {
double r1027434 = x;
double r1027435 = -0.02697179057437607;
bool r1027436 = r1027434 <= r1027435;
double r1027437 = tan(r1027434);
double r1027438 = r1027434 - r1027437;
double r1027439 = r1027434 / r1027438;
double r1027440 = sin(r1027434);
double r1027441 = r1027440 / r1027438;
double r1027442 = r1027439 - r1027441;
double r1027443 = log1p(r1027442);
double r1027444 = expm1(r1027443);
double r1027445 = 0.029925645760154832;
bool r1027446 = r1027434 <= r1027445;
double r1027447 = r1027434 * r1027434;
double r1027448 = 0.225;
double r1027449 = -0.5;
double r1027450 = fma(r1027447, r1027448, r1027449);
double r1027451 = r1027447 * r1027447;
double r1027452 = -0.009642857142857142;
double r1027453 = r1027451 * r1027452;
double r1027454 = r1027450 + r1027453;
double r1027455 = r1027446 ? r1027454 : r1027444;
double r1027456 = r1027436 ? r1027444 : r1027455;
return r1027456;
}



Bits error versus x
if x < -0.02697179057437607 or 0.029925645760154832 < x Initial program 0.1
rmApplied div-sub0.1
rmApplied expm1-log1p-u0.1
if -0.02697179057437607 < x < 0.029925645760154832Initial program 62.7
Taylor expanded around 0 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019158 +o rules:numerics
(FPCore (x)
:name "sintan (problem 3.4.5)"
(/ (- x (sin x)) (- x (tan x))))