\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;x \le -0.036269821600860841 \lor \neg \left(x \le 0.0386831041855637339\right):\\
\;\;\;\;\frac{\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, -\sin x\right)}{\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, -\tan x\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(\mathsf{fma}\left(\frac{9}{40}, {x}^{2}, -\mathsf{fma}\left(\frac{27}{2800}, {x}^{4}, \frac{1}{2}\right)\right)\right)\right)\\
\end{array}double code(double x) {
return ((x - sin(x)) / (x - tan(x)));
}
double code(double x) {
double temp;
if (((x <= -0.03626982160086084) || !(x <= 0.038683104185563734))) {
temp = (fma((cbrt(x) * cbrt(x)), cbrt(x), -sin(x)) / fma((cbrt(x) * cbrt(x)), cbrt(x), -tan(x)));
} else {
temp = log1p(expm1(fma(0.225, pow(x, 2.0), -fma(0.009642857142857142, pow(x, 4.0), 0.5))));
}
return temp;
}



Bits error versus x
Results
if x < -0.03626982160086084 or 0.038683104185563734 < x Initial program 0.1
rmApplied add-cube-cbrt1.4
Applied fma-neg1.4
rmApplied add-cube-cbrt0.1
Applied fma-neg0.1
if -0.03626982160086084 < x < 0.038683104185563734Initial program 63.2
Taylor expanded around 0 0.0
Simplified0.0
rmApplied log1p-expm1-u0.0
Final simplification0.1
herbie shell --seed 2020065 +o rules:numerics
(FPCore (x)
:name "sintan (problem 3.4.5)"
:precision binary64
(/ (- x (sin x)) (- x (tan x))))