\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 r12807 = 1.0;
double r12808 = x;
double r12809 = tan(r12808);
double r12810 = r12809 * r12809;
double r12811 = r12807 - r12810;
double r12812 = r12807 + r12810;
double r12813 = r12811 / r12812;
return r12813;
}
double f(double x) {
double r12814 = 1.0;
double r12815 = x;
double r12816 = tan(r12815);
double r12817 = sin(r12815);
double r12818 = r12816 * r12817;
double r12819 = cos(r12815);
double r12820 = r12818 / r12819;
double r12821 = r12814 + r12820;
double r12822 = r12814 / r12821;
double r12823 = r12816 * r12816;
double r12824 = r12814 + r12823;
double r12825 = r12823 / r12824;
double r12826 = r12822 - r12825;
return r12826;
}



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 2019362
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))