\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\left(1 + \tan x\right) \cdot \left(1 - \tan x\right)}{1 + \tan x \cdot \tan x}double f(double x) {
double r339233 = 1.0;
double r339234 = x;
double r339235 = tan(r339234);
double r339236 = r339235 * r339235;
double r339237 = r339233 - r339236;
double r339238 = r339233 + r339236;
double r339239 = r339237 / r339238;
return r339239;
}
double f(double x) {
double r339240 = 1.0;
double r339241 = x;
double r339242 = tan(r339241);
double r339243 = r339240 + r339242;
double r339244 = r339240 - r339242;
double r339245 = r339243 * r339244;
double r339246 = r339242 * r339242;
double r339247 = r339240 + r339246;
double r339248 = r339245 / r339247;
return r339248;
}



Bits error versus x
Results
Initial program 0.3
rmApplied *-un-lft-identity0.3
Applied difference-of-squares0.4
Final simplification0.4
herbie shell --seed 2019142 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))