\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\left(-\left(1 + \tan x\right) \cdot \tan x\right) + \left(1 + \tan x\right)}{1 + \tan x \cdot \tan x}double f(double x) {
double r1907571 = 1.0;
double r1907572 = x;
double r1907573 = tan(r1907572);
double r1907574 = r1907573 * r1907573;
double r1907575 = r1907571 - r1907574;
double r1907576 = r1907571 + r1907574;
double r1907577 = r1907575 / r1907576;
return r1907577;
}
double f(double x) {
double r1907578 = 1.0;
double r1907579 = x;
double r1907580 = tan(r1907579);
double r1907581 = r1907578 + r1907580;
double r1907582 = r1907581 * r1907580;
double r1907583 = -r1907582;
double r1907584 = r1907583 + r1907581;
double r1907585 = r1907580 * r1907580;
double r1907586 = r1907578 + r1907585;
double r1907587 = r1907584 / r1907586;
return r1907587;
}



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