\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 r335636 = 1.0;
double r335637 = x;
double r335638 = tan(r335637);
double r335639 = r335638 * r335638;
double r335640 = r335636 - r335639;
double r335641 = r335636 + r335639;
double r335642 = r335640 / r335641;
return r335642;
}
double f(double x) {
double r335643 = 1.0;
double r335644 = x;
double r335645 = tan(r335644);
double r335646 = r335643 + r335645;
double r335647 = r335643 - r335645;
double r335648 = r335646 * r335647;
double r335649 = r335645 * r335645;
double r335650 = r335643 + r335649;
double r335651 = r335648 / r335650;
return r335651;
}



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 2019155 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))