\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\sqrt{1} + \tan x}{\frac{\mathsf{fma}\left(\tan x, \tan x, 1\right)}{\sqrt{1} - \tan x}}double f(double x) {
double r27940 = 1.0;
double r27941 = x;
double r27942 = tan(r27941);
double r27943 = r27942 * r27942;
double r27944 = r27940 - r27943;
double r27945 = r27940 + r27943;
double r27946 = r27944 / r27945;
return r27946;
}
double f(double x) {
double r27947 = 1.0;
double r27948 = sqrt(r27947);
double r27949 = x;
double r27950 = tan(r27949);
double r27951 = r27948 + r27950;
double r27952 = fma(r27950, r27950, r27947);
double r27953 = r27948 - r27950;
double r27954 = r27952 / r27953;
double r27955 = r27951 / r27954;
return r27955;
}



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