\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\frac{1 - \tan x}{\frac{1 - \tan x}{1 - \tan x \cdot \tan x}}}{1 + \tan x \cdot \tan x}double f(double x) {
double r789223 = 1.0;
double r789224 = x;
double r789225 = tan(r789224);
double r789226 = r789225 * r789225;
double r789227 = r789223 - r789226;
double r789228 = r789223 + r789226;
double r789229 = r789227 / r789228;
return r789229;
}
double f(double x) {
double r789230 = 1.0;
double r789231 = x;
double r789232 = tan(r789231);
double r789233 = r789230 - r789232;
double r789234 = r789232 * r789232;
double r789235 = r789230 - r789234;
double r789236 = r789233 / r789235;
double r789237 = r789233 / r789236;
double r789238 = r789230 + r789234;
double r789239 = r789237 / r789238;
return r789239;
}



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