\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\left(\tan x + 1\right) \cdot \frac{1 - \tan x}{\tan x \cdot \tan x + 1}double f(double x) {
double r761460 = 1.0;
double r761461 = x;
double r761462 = tan(r761461);
double r761463 = r761462 * r761462;
double r761464 = r761460 - r761463;
double r761465 = r761460 + r761463;
double r761466 = r761464 / r761465;
return r761466;
}
double f(double x) {
double r761467 = x;
double r761468 = tan(r761467);
double r761469 = 1.0;
double r761470 = r761468 + r761469;
double r761471 = r761469 - r761468;
double r761472 = r761468 * r761468;
double r761473 = r761472 + r761469;
double r761474 = r761471 / r761473;
double r761475 = r761470 * r761474;
return r761475;
}



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