\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1 + \tan x}{\frac{1 + \tan x \cdot \tan x}{1 - \tan x}}double f(double x) {
double r697141 = 1.0;
double r697142 = x;
double r697143 = tan(r697142);
double r697144 = r697143 * r697143;
double r697145 = r697141 - r697144;
double r697146 = r697141 + r697144;
double r697147 = r697145 / r697146;
return r697147;
}
double f(double x) {
double r697148 = 1.0;
double r697149 = x;
double r697150 = tan(r697149);
double r697151 = r697148 + r697150;
double r697152 = r697150 * r697150;
double r697153 = r697148 + r697152;
double r697154 = r697148 - r697150;
double r697155 = r697153 / r697154;
double r697156 = r697151 / r697155;
return r697156;
}



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