\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\mathsf{fma}\left(\left(\tan x\right), \left(\tan x\right), -1\right)}{-1 - \tan x \cdot \tan x}double f(double x) {
double r3071684 = 1.0;
double r3071685 = x;
double r3071686 = tan(r3071685);
double r3071687 = r3071686 * r3071686;
double r3071688 = r3071684 - r3071687;
double r3071689 = r3071684 + r3071687;
double r3071690 = r3071688 / r3071689;
return r3071690;
}
double f(double x) {
double r3071691 = x;
double r3071692 = tan(r3071691);
double r3071693 = -1.0;
double r3071694 = fma(r3071692, r3071692, r3071693);
double r3071695 = r3071692 * r3071692;
double r3071696 = r3071693 - r3071695;
double r3071697 = r3071694 / r3071696;
return r3071697;
}



Bits error versus x
Initial program 0.3
rmApplied frac-2neg0.3
Simplified0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019125 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))