\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1 + \tan x}{\frac{\mathsf{fma}\left(\tan x, \tan x, 1\right)}{1 - \tan x}}double f(double x) {
double r693611 = 1.0;
double r693612 = x;
double r693613 = tan(r693612);
double r693614 = r693613 * r693613;
double r693615 = r693611 - r693614;
double r693616 = r693611 + r693614;
double r693617 = r693615 / r693616;
return r693617;
}
double f(double x) {
double r693618 = 1.0;
double r693619 = x;
double r693620 = tan(r693619);
double r693621 = r693618 + r693620;
double r693622 = fma(r693620, r693620, r693618);
double r693623 = r693618 - r693620;
double r693624 = r693622 / r693623;
double r693625 = r693621 / r693624;
return r693625;
}



Bits error versus x
Initial program 0.3
rmApplied *-un-lft-identity0.3
Applied difference-of-squares0.4
Applied associate-/l*0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019163 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))