\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\left(\tan x + \sqrt{1}\right) \cdot \left(\sqrt{1} - \tan x\right)}{1 + \tan x \cdot \tan x}double f(double x) {
double r13227 = 1.0;
double r13228 = x;
double r13229 = tan(r13228);
double r13230 = r13229 * r13229;
double r13231 = r13227 - r13230;
double r13232 = r13227 + r13230;
double r13233 = r13231 / r13232;
return r13233;
}
double f(double x) {
double r13234 = x;
double r13235 = tan(r13234);
double r13236 = 1.0;
double r13237 = sqrt(r13236);
double r13238 = r13235 + r13237;
double r13239 = r13237 - r13235;
double r13240 = r13238 * r13239;
double r13241 = r13235 * r13235;
double r13242 = r13236 + r13241;
double r13243 = r13240 / r13242;
return r13243;
}



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