\frac{x - \sin x}{x - \tan x}
\begin{array}{l}
\mathbf{if}\;x \leq -2.420166958477668:\\
\;\;\;\;\begin{array}{l}
t_0 := x \cdot \cos x\\
t_1 := \frac{\sin x}{x}\\
\left(\frac{\sin x}{t_0} + \left(1 + \frac{{t_1}^{2}}{{\cos x}^{2}}\right)\right) - \left(t_1 + \frac{{\sin x}^{2}}{x \cdot t_0}\right)
\end{array}\\
\mathbf{elif}\;x \leq 0.02665164670869842:\\
\;\;\;\;\mathsf{fma}\left({x}^{4}, -0.009642857142857142, \mathsf{fma}\left(0.225, x \cdot x, -0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\left(\frac{x - \sin x}{x - \tan x}\right)}^{3}}\\
\end{array}
(FPCore (x) :precision binary64 (/ (- x (sin x)) (- x (tan x))))
(FPCore (x)
:precision binary64
(if (<= x -2.420166958477668)
(let* ((t_0 (* x (cos x))) (t_1 (/ (sin x) x)))
(-
(+ (/ (sin x) t_0) (+ 1.0 (/ (pow t_1 2.0) (pow (cos x) 2.0))))
(+ t_1 (/ (pow (sin x) 2.0) (* x t_0)))))
(if (<= x 0.02665164670869842)
(fma (pow x 4.0) -0.009642857142857142 (fma 0.225 (* x x) -0.5))
(cbrt (pow (/ (- x (sin x)) (- x (tan x))) 3.0)))))double code(double x) {
return (x - sin(x)) / (x - tan(x));
}
double code(double x) {
double tmp;
if (x <= -2.420166958477668) {
double t_0_1 = x * cos(x);
double t_1_2 = sin(x) / x;
tmp = ((sin(x) / t_0_1) + (1.0 + (pow(t_1_2, 2.0) / pow(cos(x), 2.0)))) - (t_1_2 + (pow(sin(x), 2.0) / (x * t_0_1)));
} else if (x <= 0.02665164670869842) {
tmp = fma(pow(x, 4.0), -0.009642857142857142, fma(0.225, (x * x), -0.5));
} else {
tmp = cbrt(pow(((x - sin(x)) / (x - tan(x))), 3.0));
}
return tmp;
}



Bits error versus x
if x < -2.4201669584776679Initial program 0.0
Taylor expanded around inf 0.5
Simplified0.5
rmApplied associate-/r*_binary640.5
Simplified0.5
if -2.4201669584776679 < x < 0.02665164670869842Initial program 62.9
Taylor expanded around 0 0.2
Simplified0.2
rmApplied fma-udef_binary640.2
Applied associate--r+_binary640.2
Simplified0.2
Taylor expanded around 0 0.2
Simplified0.2
if 0.02665164670869842 < x Initial program 0.1
rmApplied add-cbrt-cube_binary640.1
Simplified0.1
Final simplification0.2
herbie shell --seed 2021211
(FPCore (x)
:name "sintan (problem 3.4.5)"
:precision binary64
(/ (- x (sin x)) (- x (tan x))))