\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1 - \frac{{\left(\sin x\right)}^{2}}{{\left(\cos x\right)}^{2}}}{\frac{{\left(\sin x\right)}^{2}}{{\left(\cos x\right)}^{2}} + 1}double f(double x) {
double r18378 = 1.0;
double r18379 = x;
double r18380 = tan(r18379);
double r18381 = r18380 * r18380;
double r18382 = r18378 - r18381;
double r18383 = r18378 + r18381;
double r18384 = r18382 / r18383;
return r18384;
}
double f(double x) {
double r18385 = 1.0;
double r18386 = x;
double r18387 = sin(r18386);
double r18388 = 2.0;
double r18389 = pow(r18387, r18388);
double r18390 = cos(r18386);
double r18391 = pow(r18390, r18388);
double r18392 = r18389 / r18391;
double r18393 = r18385 - r18392;
double r18394 = r18392 + r18385;
double r18395 = r18393 / r18394;
return r18395;
}



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