\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1 - \tan x \cdot \tan x}{\left(1 - \tan x\right) \cdot \frac{\mathsf{fma}\left(\tan x, \tan x, 1\right)}{1 - \tan x}}double f(double x) {
double r310700 = 1.0;
double r310701 = x;
double r310702 = tan(r310701);
double r310703 = r310702 * r310702;
double r310704 = r310700 - r310703;
double r310705 = r310700 + r310703;
double r310706 = r310704 / r310705;
return r310706;
}
double f(double x) {
double r310707 = 1.0;
double r310708 = x;
double r310709 = tan(r310708);
double r310710 = r310709 * r310709;
double r310711 = r310707 - r310710;
double r310712 = r310707 - r310709;
double r310713 = fma(r310709, r310709, r310707);
double r310714 = r310713 / r310712;
double r310715 = r310712 * r310714;
double r310716 = r310711 / r310715;
return r310716;
}



Bits error versus x
Initial program 0.3
rmApplied *-un-lft-identity0.3
Applied difference-of-squares0.4
Applied associate-/l*0.4
Simplified0.4
rmApplied flip-+0.4
Applied associate-/l/0.3
Final simplification0.3
herbie shell --seed 2019153 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))