\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;x \le -0.028868508597387585:\\
\;\;\;\;\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}\\
\mathbf{elif}\;x \le 0.027208711435501284:\\
\;\;\;\;\frac{9}{40} \cdot {x}^{2} - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{\sqrt[3]{{\left({\left(\frac{x - \sin x}{x - \tan x}\right)}^{3}\right)}^{3}}}\\
\end{array}double code(double x) {
return ((x - sin(x)) / (x - tan(x)));
}
double code(double x) {
double temp;
if ((x <= -0.028868508597387585)) {
temp = ((x / (x - tan(x))) - (sin(x) / (x - tan(x))));
} else {
double temp_1;
if ((x <= 0.027208711435501284)) {
temp_1 = ((0.225 * pow(x, 2.0)) - ((0.009642857142857142 * pow(x, 4.0)) + 0.5));
} else {
temp_1 = cbrt(cbrt(pow(pow(((x - sin(x)) / (x - tan(x))), 3.0), 3.0)));
}
temp = temp_1;
}
return temp;
}



Bits error versus x
Results
if x < -0.028868508597387585Initial program 0.0
rmApplied div-sub0.1
if -0.028868508597387585 < x < 0.027208711435501284Initial program 63.0
Taylor expanded around 0 0.0
if 0.027208711435501284 < x Initial program 0.1
rmApplied add-cbrt-cube40.9
Applied add-cbrt-cube42.1
Applied cbrt-undiv42.1
Simplified0.1
rmApplied add-cbrt-cube0.1
Simplified0.1
Final simplification0.0
herbie shell --seed 2020057
(FPCore (x)
:name "sintan (problem 3.4.5)"
:precision binary64
(/ (- x (sin x)) (- x (tan x))))