\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\sqrt{1} + \tan x}{\frac{1 + \tan x \cdot \tan x}{\sqrt{1} - \tan x}}double f(double x) {
double r15114 = 1.0;
double r15115 = x;
double r15116 = tan(r15115);
double r15117 = r15116 * r15116;
double r15118 = r15114 - r15117;
double r15119 = r15114 + r15117;
double r15120 = r15118 / r15119;
return r15120;
}
double f(double x) {
double r15121 = 1.0;
double r15122 = sqrt(r15121);
double r15123 = x;
double r15124 = tan(r15123);
double r15125 = r15122 + r15124;
double r15126 = r15124 * r15124;
double r15127 = r15121 + r15126;
double r15128 = r15122 - r15124;
double r15129 = r15127 / r15128;
double r15130 = r15125 / r15129;
return r15130;
}



Bits error versus x
Results
Initial program 0.3
rmApplied add-sqr-sqrt0.3
Applied difference-of-squares0.3
Applied associate-/l*0.4
Final simplification0.4
herbie shell --seed 2020062
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))