\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\left(1 + \tan x\right) \cdot \left(1 - \tan x\right)}{1 + \tan x \cdot \tan x}double f(double x) {
double r508612 = 1.0;
double r508613 = x;
double r508614 = tan(r508613);
double r508615 = r508614 * r508614;
double r508616 = r508612 - r508615;
double r508617 = r508612 + r508615;
double r508618 = r508616 / r508617;
return r508618;
}
double f(double x) {
double r508619 = 1.0;
double r508620 = x;
double r508621 = tan(r508620);
double r508622 = r508619 + r508621;
double r508623 = r508619 - r508621;
double r508624 = r508622 * r508623;
double r508625 = r508621 * r508621;
double r508626 = r508619 + r508625;
double r508627 = r508624 / r508626;
return r508627;
}



Bits error versus x
Results
Initial program 0.3
rmApplied *-un-lft-identity0.3
Applied difference-of-squares0.4
Final simplification0.4
herbie shell --seed 2019129
(FPCore (x)
:name "Trigonometry B"
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))