\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1}{\frac{\tan x \cdot \tan x + 1}{\left(1 + \tan x\right) \cdot \left(1 - \tan x\right)}}double f(double x) {
double r354604 = 1.0;
double r354605 = x;
double r354606 = tan(r354605);
double r354607 = r354606 * r354606;
double r354608 = r354604 - r354607;
double r354609 = r354604 + r354607;
double r354610 = r354608 / r354609;
return r354610;
}
double f(double x) {
double r354611 = 1.0;
double r354612 = x;
double r354613 = tan(r354612);
double r354614 = r354613 * r354613;
double r354615 = r354614 + r354611;
double r354616 = r354611 + r354613;
double r354617 = r354611 - r354613;
double r354618 = r354616 * r354617;
double r354619 = r354615 / r354618;
double r354620 = r354611 / r354619;
return r354620;
}



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