\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\sqrt{1} + \tan x}{\frac{1 + \tan x \cdot \tan x}{\sqrt{1} - \tan x}}double f(double x) {
double r9353 = 1.0;
double r9354 = x;
double r9355 = tan(r9354);
double r9356 = r9355 * r9355;
double r9357 = r9353 - r9356;
double r9358 = r9353 + r9356;
double r9359 = r9357 / r9358;
return r9359;
}
double f(double x) {
double r9360 = 1.0;
double r9361 = sqrt(r9360);
double r9362 = x;
double r9363 = tan(r9362);
double r9364 = r9361 + r9363;
double r9365 = r9363 * r9363;
double r9366 = r9360 + r9365;
double r9367 = r9361 - r9363;
double r9368 = r9366 / r9367;
double r9369 = r9364 / r9368;
return r9369;
}



Bits error versus x
Results
Initial program 0.3
rmApplied add-sqr-sqrt0.3
Applied difference-of-squares0.4
Applied associate-/l*0.4
Final simplification0.4
herbie shell --seed 2020024
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))