\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;x \leq -4.504252256196449:\\
\;\;\;\;\frac{x - \sin x}{x}\\
\mathbf{elif}\;x \leq 0.004713351902741206:\\
\;\;\;\;0.225 \cdot {x}^{2} - 0.5\\
\mathbf{else}:\\
\;\;\;\;\frac{x - \sin x}{x - \tan x}\\
\end{array}(FPCore (x) :precision binary64 (/ (- x (sin x)) (- x (tan x))))
(FPCore (x)
:precision binary64
(if (<= x -4.504252256196449)
(/ (- x (sin x)) x)
(if (<= x 0.004713351902741206)
(- (* 0.225 (pow x 2.0)) 0.5)
(/ (- x (sin x)) (- x (tan x))))))double code(double x) {
return (x - sin(x)) / (x - tan(x));
}
double code(double x) {
double tmp;
if (x <= -4.504252256196449) {
tmp = (x - sin(x)) / x;
} else if (x <= 0.004713351902741206) {
tmp = (0.225 * pow(x, 2.0)) - 0.5;
} else {
tmp = (x - sin(x)) / (x - tan(x));
}
return tmp;
}



Bits error versus x
Results
if x < -4.50425225619644909Initial program 0.0
Taylor expanded around inf 1.3
if -4.50425225619644909 < x < 0.0047133519027412057Initial program 63.0
Taylor expanded around 0 0.3
if 0.0047133519027412057 < x Initial program 0.1
rmApplied pow1_binary640.1
Final simplification0.5
herbie shell --seed 2021118
(FPCore (x)
:name "sintan (problem 3.4.5)"
:precision binary64
(/ (- x (sin x)) (- x (tan x))))