\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\left(1 - \tan x \cdot \tan x\right) + \mathsf{fma}\left(-\tan x, \tan x, \tan x \cdot \tan x\right)}{1 + \tan x \cdot \tan x}double f(double x) {
double r974607 = 1.0;
double r974608 = x;
double r974609 = tan(r974608);
double r974610 = r974609 * r974609;
double r974611 = r974607 - r974610;
double r974612 = r974607 + r974610;
double r974613 = r974611 / r974612;
return r974613;
}
double f(double x) {
double r974614 = 1.0;
double r974615 = x;
double r974616 = tan(r974615);
double r974617 = r974616 * r974616;
double r974618 = r974614 - r974617;
double r974619 = -r974616;
double r974620 = fma(r974619, r974616, r974617);
double r974621 = r974618 + r974620;
double r974622 = r974614 + r974617;
double r974623 = r974621 / r974622;
return r974623;
}



Bits error versus x
Initial program 0.3
rmApplied add-sqr-sqrt0.3
Applied prod-diff0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019174 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
(/ (- 1.0 (* (tan x) (tan x))) (+ 1.0 (* (tan x) (tan x)))))