\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1}{\tan x \cdot \tan x + 1} \cdot \left(1 - \tan x \cdot \tan x\right)double f(double x) {
double r478877 = 1.0;
double r478878 = x;
double r478879 = tan(r478878);
double r478880 = r478879 * r478879;
double r478881 = r478877 - r478880;
double r478882 = r478877 + r478880;
double r478883 = r478881 / r478882;
return r478883;
}
double f(double x) {
double r478884 = 1.0;
double r478885 = x;
double r478886 = tan(r478885);
double r478887 = r478886 * r478886;
double r478888 = r478887 + r478884;
double r478889 = r478884 / r478888;
double r478890 = r478884 - r478887;
double r478891 = r478889 * r478890;
return r478891;
}



Bits error versus x
Results
Initial program 0.3
rmApplied div-sub0.4
rmApplied div-inv0.4
Applied *-un-lft-identity0.4
Applied *-un-lft-identity0.4
Applied times-frac0.4
Applied distribute-rgt-out--0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019133
(FPCore (x)
:name "Trigonometry B"
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))