\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1 - \frac{\tan x \cdot \sin x}{\cos x}}{1 + \tan x \cdot \tan x}double f(double x) {
double r13400 = 1.0;
double r13401 = x;
double r13402 = tan(r13401);
double r13403 = r13402 * r13402;
double r13404 = r13400 - r13403;
double r13405 = r13400 + r13403;
double r13406 = r13404 / r13405;
return r13406;
}
double f(double x) {
double r13407 = 1.0;
double r13408 = x;
double r13409 = tan(r13408);
double r13410 = sin(r13408);
double r13411 = r13409 * r13410;
double r13412 = cos(r13408);
double r13413 = r13411 / r13412;
double r13414 = r13407 - r13413;
double r13415 = r13409 * r13409;
double r13416 = r13407 + r13415;
double r13417 = r13414 / r13416;
return r13417;
}



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