\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 r693614 = 1.0;
double r693615 = x;
double r693616 = tan(r693615);
double r693617 = r693616 * r693616;
double r693618 = r693614 - r693617;
double r693619 = r693614 + r693617;
double r693620 = r693618 / r693619;
return r693620;
}
double f(double x) {
double r693621 = 1.0;
double r693622 = x;
double r693623 = tan(r693622);
double r693624 = r693621 + r693623;
double r693625 = fma(r693623, r693623, r693621);
double r693626 = r693621 - r693623;
double r693627 = r693625 / r693626;
double r693628 = r693624 / r693627;
return r693628;
}



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)))))