\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1}{\mathsf{fma}\left(\tan x, \tan x, 1\right)} - \frac{\tan x}{\frac{\mathsf{fma}\left(\tan x, \tan x, 1\right)}{\tan x}}double f(double x) {
double r21926 = 1.0;
double r21927 = x;
double r21928 = tan(r21927);
double r21929 = r21928 * r21928;
double r21930 = r21926 - r21929;
double r21931 = r21926 + r21929;
double r21932 = r21930 / r21931;
return r21932;
}
double f(double x) {
double r21933 = 1.0;
double r21934 = x;
double r21935 = tan(r21934);
double r21936 = fma(r21935, r21935, r21933);
double r21937 = r21933 / r21936;
double r21938 = r21936 / r21935;
double r21939 = r21935 / r21938;
double r21940 = r21937 - r21939;
return r21940;
}



Bits error versus x
Initial program 0.3
rmApplied div-sub0.4
Simplified0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019344 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))