\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1}{\frac{\mathsf{fma}\left(\tan x, \tan x, 1\right)}{1 - \frac{\tan x \cdot \sin x}{\cos x}}}double f(double x) {
double r12961 = 1.0;
double r12962 = x;
double r12963 = tan(r12962);
double r12964 = r12963 * r12963;
double r12965 = r12961 - r12964;
double r12966 = r12961 + r12964;
double r12967 = r12965 / r12966;
return r12967;
}
double f(double x) {
double r12968 = 1.0;
double r12969 = x;
double r12970 = tan(r12969);
double r12971 = 1.0;
double r12972 = fma(r12970, r12970, r12971);
double r12973 = sin(r12969);
double r12974 = r12970 * r12973;
double r12975 = cos(r12969);
double r12976 = r12974 / r12975;
double r12977 = r12971 - r12976;
double r12978 = r12972 / r12977;
double r12979 = r12968 / r12978;
return r12979;
}



Bits error versus x
Initial program 0.3
rmApplied tan-quot0.4
Applied associate-*r/0.4
rmApplied clear-num0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2020046 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))