\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\left(1 + \tan x\right) \cdot \frac{1 - \tan x}{\tan x \cdot \tan x + 1}double f(double x) {
double r452806 = 1.0;
double r452807 = x;
double r452808 = tan(r452807);
double r452809 = r452808 * r452808;
double r452810 = r452806 - r452809;
double r452811 = r452806 + r452809;
double r452812 = r452810 / r452811;
return r452812;
}
double f(double x) {
double r452813 = 1.0;
double r452814 = x;
double r452815 = tan(r452814);
double r452816 = r452813 + r452815;
double r452817 = r452813 - r452815;
double r452818 = r452815 * r452815;
double r452819 = r452818 + r452813;
double r452820 = r452817 / r452819;
double r452821 = r452816 * r452820;
return r452821;
}



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