\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\mathsf{fma}\left(-\tan x, \tan x, \tan x \cdot \tan x\right) + \left(1 - \tan x \cdot \tan x\right)}{\tan x \cdot \tan x + 1}double f(double x) {
double r644843 = 1.0;
double r644844 = x;
double r644845 = tan(r644844);
double r644846 = r644845 * r644845;
double r644847 = r644843 - r644846;
double r644848 = r644843 + r644846;
double r644849 = r644847 / r644848;
return r644849;
}
double f(double x) {
double r644850 = x;
double r644851 = tan(r644850);
double r644852 = -r644851;
double r644853 = r644851 * r644851;
double r644854 = fma(r644852, r644851, r644853);
double r644855 = 1.0;
double r644856 = r644855 - r644853;
double r644857 = r644854 + r644856;
double r644858 = r644853 + r644855;
double r644859 = r644857 / r644858;
return r644859;
}



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)))))