\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1 - \tan x \cdot \frac{\sin x}{\cos x}}{1 + \tan x \cdot \tan x}double f(double x) {
double r12299 = 1.0;
double r12300 = x;
double r12301 = tan(r12300);
double r12302 = r12301 * r12301;
double r12303 = r12299 - r12302;
double r12304 = r12299 + r12302;
double r12305 = r12303 / r12304;
return r12305;
}
double f(double x) {
double r12306 = 1.0;
double r12307 = x;
double r12308 = tan(r12307);
double r12309 = sin(r12307);
double r12310 = cos(r12307);
double r12311 = r12309 / r12310;
double r12312 = r12308 * r12311;
double r12313 = r12306 - r12312;
double r12314 = r12308 * r12308;
double r12315 = r12306 + r12314;
double r12316 = r12313 / r12315;
return r12316;
}



Bits error versus x
Results
Initial program 0.3
rmApplied tan-quot0.4
Applied associate-*r/0.4
rmApplied *-un-lft-identity0.4
Applied times-frac0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2020046 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))