\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1 + \tan x}{\frac{1 + \frac{\sin x \cdot \tan x}{\cos x}}{1 - \tan x}}double f(double x) {
double r537819 = 1.0;
double r537820 = x;
double r537821 = tan(r537820);
double r537822 = r537821 * r537821;
double r537823 = r537819 - r537822;
double r537824 = r537819 + r537822;
double r537825 = r537823 / r537824;
return r537825;
}
double f(double x) {
double r537826 = 1.0;
double r537827 = x;
double r537828 = tan(r537827);
double r537829 = r537826 + r537828;
double r537830 = sin(r537827);
double r537831 = r537830 * r537828;
double r537832 = cos(r537827);
double r537833 = r537831 / r537832;
double r537834 = r537826 + r537833;
double r537835 = r537826 - r537828;
double r537836 = r537834 / r537835;
double r537837 = r537829 / r537836;
return r537837;
}



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