\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}1 \cdot \frac{1}{\frac{{\left(\sin x\right)}^{2}}{{\left(\cos x\right)}^{2}} + 1} - \frac{{\left(\sin x\right)}^{2}}{\left(\frac{{\left(\sin x\right)}^{2}}{{\left(\cos x\right)}^{2}} + 1\right) \cdot {\left(\cos x\right)}^{2}}double f(double x) {
double r14910 = 1.0;
double r14911 = x;
double r14912 = tan(r14911);
double r14913 = r14912 * r14912;
double r14914 = r14910 - r14913;
double r14915 = r14910 + r14913;
double r14916 = r14914 / r14915;
return r14916;
}
double f(double x) {
double r14917 = 1.0;
double r14918 = 1.0;
double r14919 = x;
double r14920 = sin(r14919);
double r14921 = 2.0;
double r14922 = pow(r14920, r14921);
double r14923 = cos(r14919);
double r14924 = pow(r14923, r14921);
double r14925 = r14922 / r14924;
double r14926 = r14925 + r14917;
double r14927 = r14918 / r14926;
double r14928 = r14917 * r14927;
double r14929 = r14926 * r14924;
double r14930 = r14922 / r14929;
double r14931 = r14928 - r14930;
return r14931;
}



Bits error versus x
Results
Initial program 0.3
rmApplied tan-quot0.4
Applied associate-*r/0.4
rmApplied expm1-log1p-u0.4
Taylor expanded around inf 0.4
Final simplification0.4
herbie shell --seed 2019346 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))