\frac{x - \sin x}{x - \tan x}\begin{array}{l}
\mathbf{if}\;x \le -0.029158977316943849:\\
\;\;\;\;\log \left(e^{\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}}\right)\\
\mathbf{elif}\;x \le 0.028578832745905277:\\
\;\;\;\;\frac{9}{40} \cdot {x}^{2} - \mathsf{fma}\left(\frac{27}{2800}, {x}^{4}, \frac{1}{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{x}{x - \tan x}\right)}^{3} - {\left(\frac{\sin x}{x - \tan x}\right)}^{3}}{\mathsf{fma}\left(\frac{x}{x - \tan x}, \frac{x}{x - \tan x}, \frac{\sin x}{x - \tan x} \cdot \left(\frac{x}{x - \tan x} + \frac{\sin x}{x - \tan x}\right)\right)}\\
\end{array}double f(double x) {
double r26635 = x;
double r26636 = sin(r26635);
double r26637 = r26635 - r26636;
double r26638 = tan(r26635);
double r26639 = r26635 - r26638;
double r26640 = r26637 / r26639;
return r26640;
}
double f(double x) {
double r26641 = x;
double r26642 = -0.02915897731694385;
bool r26643 = r26641 <= r26642;
double r26644 = tan(r26641);
double r26645 = r26641 - r26644;
double r26646 = r26641 / r26645;
double r26647 = sin(r26641);
double r26648 = r26647 / r26645;
double r26649 = r26646 - r26648;
double r26650 = exp(r26649);
double r26651 = log(r26650);
double r26652 = 0.028578832745905277;
bool r26653 = r26641 <= r26652;
double r26654 = 0.225;
double r26655 = 2.0;
double r26656 = pow(r26641, r26655);
double r26657 = r26654 * r26656;
double r26658 = 0.009642857142857142;
double r26659 = 4.0;
double r26660 = pow(r26641, r26659);
double r26661 = 0.5;
double r26662 = fma(r26658, r26660, r26661);
double r26663 = r26657 - r26662;
double r26664 = 3.0;
double r26665 = pow(r26646, r26664);
double r26666 = pow(r26648, r26664);
double r26667 = r26665 - r26666;
double r26668 = r26646 + r26648;
double r26669 = r26648 * r26668;
double r26670 = fma(r26646, r26646, r26669);
double r26671 = r26667 / r26670;
double r26672 = r26653 ? r26663 : r26671;
double r26673 = r26643 ? r26651 : r26672;
return r26673;
}



Bits error versus x
if x < -0.02915897731694385Initial program 0.1
rmApplied div-sub0.1
rmApplied add-log-exp0.2
Applied add-log-exp0.2
Applied diff-log0.2
Simplified0.1
if -0.02915897731694385 < x < 0.028578832745905277Initial program 63.1
Taylor expanded around 0 0.0
Simplified0.0
if 0.028578832745905277 < x Initial program 0.0
rmApplied div-sub0.0
rmApplied flip3--0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020042 +o rules:numerics
(FPCore (x)
:name "sintan (problem 3.4.5)"
:precision binary64
(/ (- x (sin x)) (- x (tan x))))