\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\mathsf{fma}\left(-\frac{\tan x}{\cos x}, \sin x, \sin x \cdot \frac{\tan x}{\cos x}\right) + \mathsf{fma}\left(1, 1, \frac{\tan x}{\cos x} \cdot \left(-\sin x\right)\right)}{\frac{\sin x \cdot \sin x}{\cos x \cdot \cos x} + 1}double f(double x) {
double r662638 = 1.0;
double r662639 = x;
double r662640 = tan(r662639);
double r662641 = r662640 * r662640;
double r662642 = r662638 - r662641;
double r662643 = r662638 + r662641;
double r662644 = r662642 / r662643;
return r662644;
}
double f(double x) {
double r662645 = x;
double r662646 = tan(r662645);
double r662647 = cos(r662645);
double r662648 = r662646 / r662647;
double r662649 = -r662648;
double r662650 = sin(r662645);
double r662651 = r662650 * r662648;
double r662652 = fma(r662649, r662650, r662651);
double r662653 = 1.0;
double r662654 = -r662650;
double r662655 = r662648 * r662654;
double r662656 = fma(r662653, r662653, r662655);
double r662657 = r662652 + r662656;
double r662658 = r662650 * r662650;
double r662659 = r662647 * r662647;
double r662660 = r662658 / r662659;
double r662661 = r662660 + r662653;
double r662662 = r662657 / r662661;
return r662662;
}



Bits error versus x
Initial program 0.3
rmApplied tan-quot0.4
Applied associate-*l/0.4
rmApplied *-un-lft-identity0.4
Applied times-frac0.4
Applied *-un-lft-identity0.4
Applied prod-diff0.4
rmApplied tan-quot0.4
Applied tan-quot0.4
Applied frac-times0.4
Final simplification0.4
herbie shell --seed 2019149 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))