\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\left(1 - \tan x\right) \cdot \left(\left(1 + \tan x\right) \cdot \left(1 - \tan x\right)\right)}{\left(1 - \tan x\right) \cdot \left(1 + \tan x \cdot \tan x\right)}double f(double x) {
double r740083 = 1.0;
double r740084 = x;
double r740085 = tan(r740084);
double r740086 = r740085 * r740085;
double r740087 = r740083 - r740086;
double r740088 = r740083 + r740086;
double r740089 = r740087 / r740088;
return r740089;
}
double f(double x) {
double r740090 = 1.0;
double r740091 = x;
double r740092 = tan(r740091);
double r740093 = r740090 - r740092;
double r740094 = r740090 + r740092;
double r740095 = r740094 * r740093;
double r740096 = r740093 * r740095;
double r740097 = r740092 * r740092;
double r740098 = r740090 + r740097;
double r740099 = r740093 * r740098;
double r740100 = r740096 / r740099;
return r740100;
}



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