\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1 - \tan x \cdot \tan x}{\mathsf{fma}\left(\tan x, \tan x, 1\right)}double f(double x) {
double r15762 = 1.0;
double r15763 = x;
double r15764 = tan(r15763);
double r15765 = r15764 * r15764;
double r15766 = r15762 - r15765;
double r15767 = r15762 + r15765;
double r15768 = r15766 / r15767;
return r15768;
}
double f(double x) {
double r15769 = 1.0;
double r15770 = x;
double r15771 = tan(r15770);
double r15772 = r15771 * r15771;
double r15773 = r15769 - r15772;
double r15774 = fma(r15771, r15771, r15769);
double r15775 = r15773 / r15774;
return r15775;
}



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