\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1}{1 + \frac{\tan x \cdot \sin x}{\cos x}} - \frac{\tan x \cdot \tan x}{1 + \tan x \cdot \tan x}double f(double x) {
double r9190 = 1.0;
double r9191 = x;
double r9192 = tan(r9191);
double r9193 = r9192 * r9192;
double r9194 = r9190 - r9193;
double r9195 = r9190 + r9193;
double r9196 = r9194 / r9195;
return r9196;
}
double f(double x) {
double r9197 = 1.0;
double r9198 = x;
double r9199 = tan(r9198);
double r9200 = sin(r9198);
double r9201 = r9199 * r9200;
double r9202 = cos(r9198);
double r9203 = r9201 / r9202;
double r9204 = r9197 + r9203;
double r9205 = r9197 / r9204;
double r9206 = r9199 * r9199;
double r9207 = r9197 + r9206;
double r9208 = r9206 / r9207;
double r9209 = r9205 - r9208;
return r9209;
}



Bits error versus x
Results
Initial program 0.3
rmApplied div-sub0.4
rmApplied tan-quot0.4
Applied associate-*r/0.4
Final simplification0.4
herbie shell --seed 2020056
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))