\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\left(1 - \tan x \cdot \tan x\right) \cdot \frac{1}{1 + \tan x \cdot \tan x}double f(double x) {
double r18768 = 1.0;
double r18769 = x;
double r18770 = tan(r18769);
double r18771 = r18770 * r18770;
double r18772 = r18768 - r18771;
double r18773 = r18768 + r18771;
double r18774 = r18772 / r18773;
return r18774;
}
double f(double x) {
double r18775 = 1.0;
double r18776 = x;
double r18777 = tan(r18776);
double r18778 = r18777 * r18777;
double r18779 = r18775 - r18778;
double r18780 = 1.0;
double r18781 = r18775 + r18778;
double r18782 = r18780 / r18781;
double r18783 = r18779 * r18782;
return r18783;
}



Bits error versus x
Results
Initial program 0.3
rmApplied add-log-exp0.4
rmApplied flip-+0.5
Applied associate-/r/0.5
Applied exp-prod0.9
Applied log-pow0.9
Simplified0.4
Final simplification0.4
herbie shell --seed 2019306
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))