\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1 - \frac{1}{\cos x} \cdot \left(\tan x \cdot \sin x\right)}{1 + \tan x \cdot \tan x}double f(double x) {
double r446625 = 1.0;
double r446626 = x;
double r446627 = tan(r446626);
double r446628 = r446627 * r446627;
double r446629 = r446625 - r446628;
double r446630 = r446625 + r446628;
double r446631 = r446629 / r446630;
return r446631;
}
double f(double x) {
double r446632 = 1.0;
double r446633 = x;
double r446634 = cos(r446633);
double r446635 = r446632 / r446634;
double r446636 = tan(r446633);
double r446637 = sin(r446633);
double r446638 = r446636 * r446637;
double r446639 = r446635 * r446638;
double r446640 = r446632 - r446639;
double r446641 = r446636 * r446636;
double r446642 = r446632 + r446641;
double r446643 = r446640 / r446642;
return r446643;
}



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