\frac{x - \sin x}{x - \tan x}
\begin{array}{l}
t_0 := \frac{x - \sin x}{x - \tan x}\\
\mathbf{if}\;x \leq -0.03251857343197739:\\
\;\;\;\;\sqrt[3]{{t_0}^{3}}\\
\mathbf{elif}\;x \leq 0.0294829394400758:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(\mathsf{fma}\left(0.225, x \cdot x, \mathsf{fma}\left({x}^{4}, -0.009642857142857142, -0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
(FPCore (x) :precision binary64 (/ (- x (sin x)) (- x (tan x))))
(FPCore (x)
:precision binary64
(let* ((t_0 (/ (- x (sin x)) (- x (tan x)))))
(if (<= x -0.03251857343197739)
(cbrt (pow t_0 3.0))
(if (<= x 0.0294829394400758)
(log1p
(expm1
(fma 0.225 (* x x) (fma (pow x 4.0) -0.009642857142857142 -0.5))))
t_0))))double code(double x) {
return (x - sin(x)) / (x - tan(x));
}
double code(double x) {
double t_0 = (x - sin(x)) / (x - tan(x));
double tmp;
if (x <= -0.03251857343197739) {
tmp = cbrt(pow(t_0, 3.0));
} else if (x <= 0.0294829394400758) {
tmp = log1p(expm1(fma(0.225, (x * x), fma(pow(x, 4.0), -0.009642857142857142, -0.5))));
} else {
tmp = t_0;
}
return tmp;
}



Bits error versus x
if x < -0.032518573431977393Initial program 0.1
Applied add-cbrt-cube_binary640.1
Simplified0.1
if -0.032518573431977393 < x < 0.0294829394400757984Initial program 63.3
Taylor expanded in x around 0 0.0
Simplified0.0
Applied log1p-expm1-u_binary640.0
Simplified0.0
if 0.0294829394400757984 < x Initial program 0.0
Final simplification0.0
herbie shell --seed 2021280
(FPCore (x)
:name "sintan (problem 3.4.5)"
:precision binary64
(/ (- x (sin x)) (- x (tan x))))