\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 - \tan x \cdot \tan x}}double f(double x) {
double r9974 = 1.0;
double r9975 = x;
double r9976 = tan(r9975);
double r9977 = r9976 * r9976;
double r9978 = r9974 - r9977;
double r9979 = r9974 + r9977;
double r9980 = r9978 / r9979;
return r9980;
}
double f(double x) {
double r9981 = 1.0;
double r9982 = x;
double r9983 = tan(r9982);
double r9984 = 1.0;
double r9985 = fma(r9983, r9983, r9984);
double r9986 = r9983 * r9983;
double r9987 = r9984 - r9986;
double r9988 = r9985 / r9987;
double r9989 = r9981 / r9988;
return r9989;
}



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