\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;\frac{x - \sin x}{x - \tan x} \leq 1.007754063695368:\\
\;\;\;\;\frac{x - \sin x}{x - \tan x}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}(FPCore (x) :precision binary64 (/ (- x (sin x)) (- x (tan x))))
(FPCore (x) :precision binary64 (if (<= (/ (- x (sin x)) (- x (tan x))) 1.007754063695368) (/ (- x (sin x)) (- x (tan x))) 0.0))
double code(double x) {
return (x - sin(x)) / (x - tan(x));
}
double code(double x) {
double tmp;
if (((x - sin(x)) / (x - tan(x))) <= 1.007754063695368) {
tmp = (x - sin(x)) / (x - tan(x));
} else {
tmp = 0.0;
}
return tmp;
}



Bits error versus x
Results
if (/.f64 (-.f64 x (sin.f64 x)) (-.f64 x (tan.f64 x))) < 1.0077540636953679Initial program 0.6
if 1.0077540636953679 < (/.f64 (-.f64 x (sin.f64 x)) (-.f64 x (tan.f64 x))) Initial program 63.7
Taylor expanded around 0 62.0
Simplified62.0
Final simplification30.6
herbie shell --seed 2020268
(FPCore (x)
:name "sintan (problem 3.4.5)"
:precision binary64
(/ (- x (sin x)) (- x (tan x))))