\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 r315467 = 1.0;
double r315468 = x;
double r315469 = tan(r315468);
double r315470 = r315469 * r315469;
double r315471 = r315467 - r315470;
double r315472 = r315467 + r315470;
double r315473 = r315471 / r315472;
return r315473;
}
double f(double x) {
double r315474 = 1.0;
double r315475 = x;
double r315476 = tan(r315475);
double r315477 = r315474 + r315476;
double r315478 = r315474 - r315476;
double r315479 = r315477 * r315478;
double r315480 = r315476 * r315476;
double r315481 = r315474 + r315480;
double r315482 = r315479 / r315481;
return r315482;
}



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 2019155
(FPCore (x)
:name "Trigonometry B"
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))