\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\left(1 - \tan x \cdot \tan x\right) \cdot \left(1 - \tan x\right)}{\left(1 - \tan x\right) \cdot \left(1 + \tan x \cdot \tan x\right)}double f(double x) {
double r341738 = 1.0;
double r341739 = x;
double r341740 = tan(r341739);
double r341741 = r341740 * r341740;
double r341742 = r341738 - r341741;
double r341743 = r341738 + r341741;
double r341744 = r341742 / r341743;
return r341744;
}
double f(double x) {
double r341745 = 1.0;
double r341746 = x;
double r341747 = tan(r341746);
double r341748 = r341747 * r341747;
double r341749 = r341745 - r341748;
double r341750 = r341745 - r341747;
double r341751 = r341749 * r341750;
double r341752 = r341745 + r341748;
double r341753 = r341750 * r341752;
double r341754 = r341751 / r341753;
return r341754;
}



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
Final simplification0.4
herbie shell --seed 2019151 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))