\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\left(1 + \tan x\right) \cdot \frac{1 - \tan x}{\tan x \cdot \tan x + 1}double f(double x) {
double r521258 = 1.0;
double r521259 = x;
double r521260 = tan(r521259);
double r521261 = r521260 * r521260;
double r521262 = r521258 - r521261;
double r521263 = r521258 + r521261;
double r521264 = r521262 / r521263;
return r521264;
}
double f(double x) {
double r521265 = 1.0;
double r521266 = x;
double r521267 = tan(r521266);
double r521268 = r521265 + r521267;
double r521269 = r521265 - r521267;
double r521270 = r521267 * r521267;
double r521271 = r521270 + r521265;
double r521272 = r521269 / r521271;
double r521273 = r521268 * r521272;
return r521273;
}



Bits error versus x
Results
Initial program 0.3
rmApplied *-un-lft-identity0.3
Applied add-sqr-sqrt0.3
Applied difference-of-squares0.4
Applied times-frac0.4
Simplified0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019152
(FPCore (x)
:name "Trigonometry B"
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))