\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{\frac{\tan x \cdot \sin x}{\cos x}}{1 + \frac{\tan x \cdot \sin x}{\cos x}}double f(double x) {
double r13520 = 1.0;
double r13521 = x;
double r13522 = tan(r13521);
double r13523 = r13522 * r13522;
double r13524 = r13520 - r13523;
double r13525 = r13520 + r13523;
double r13526 = r13524 / r13525;
return r13526;
}
double f(double x) {
double r13527 = 1.0;
double r13528 = x;
double r13529 = tan(r13528);
double r13530 = sin(r13528);
double r13531 = r13529 * r13530;
double r13532 = cos(r13528);
double r13533 = r13531 / r13532;
double r13534 = r13527 + r13533;
double r13535 = r13527 / r13534;
double r13536 = r13533 / r13534;
double r13537 = r13535 - r13536;
return r13537;
}



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