\frac{x - \sin x}{x - \tan x}
\begin{array}{l}
t_0 := x - \sin x\\
\mathbf{if}\;x \leq -0.02981343514249264:\\
\;\;\;\;\frac{t_0}{x - \frac{\sin x}{\cos x}}\\
\mathbf{elif}\;x \leq 0.029073431474603176:\\
\;\;\;\;\mathsf{fma}\left(0.225, x \cdot x, \mathsf{fma}\left({x}^{4}, -0.009642857142857142, -0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{x - \tan x}\\
\end{array}
(FPCore (x) :precision binary64 (/ (- x (sin x)) (- x (tan x))))
(FPCore (x)
:precision binary64
(let* ((t_0 (- x (sin x))))
(if (<= x -0.02981343514249264)
(/ t_0 (- x (/ (sin x) (cos x))))
(if (<= x 0.029073431474603176)
(fma 0.225 (* x x) (fma (pow x 4.0) -0.009642857142857142 -0.5))
(/ t_0 (- x (tan x)))))))double code(double x) {
return (x - sin(x)) / (x - tan(x));
}
double code(double x) {
double t_0 = x - sin(x);
double tmp;
if (x <= -0.02981343514249264) {
tmp = t_0 / (x - (sin(x) / cos(x)));
} else if (x <= 0.029073431474603176) {
tmp = fma(0.225, (x * x), fma(pow(x, 4.0), -0.009642857142857142, -0.5));
} else {
tmp = t_0 / (x - tan(x));
}
return tmp;
}



Bits error versus x
if x < -0.0298134351424926385Initial program 0.0
Taylor expanded in x around inf 0.0
if -0.0298134351424926385 < x < 0.0290734314746031765Initial program 63.1
Taylor expanded in x around 0 0.0
Simplified0.0
Taylor expanded in x around 0 0.0
Simplified0.0
if 0.0290734314746031765 < x Initial program 0.1
Applied add-cube-cbrt_binary640.1
Applied add-cube-cbrt_binary641.4
Applied prod-diff_binary641.4
Simplified0.1
Simplified0.1
Final simplification0.0
herbie shell --seed 2022024
(FPCore (x)
:name "sintan (problem 3.4.5)"
:precision binary64
(/ (- x (sin x)) (- x (tan x))))