\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\sqrt{1} - \tan x}{\mathsf{fma}\left(\tan x, \tan x, 1\right)} \cdot \left(\sqrt{1} + \tan x\right)double f(double x) {
double r890081 = 1.0;
double r890082 = x;
double r890083 = tan(r890082);
double r890084 = r890083 * r890083;
double r890085 = r890081 - r890084;
double r890086 = r890081 + r890084;
double r890087 = r890085 / r890086;
return r890087;
}
double f(double x) {
double r890088 = 1.0;
double r890089 = sqrt(r890088);
double r890090 = x;
double r890091 = tan(r890090);
double r890092 = r890089 - r890091;
double r890093 = fma(r890091, r890091, r890088);
double r890094 = r890092 / r890093;
double r890095 = r890089 + r890091;
double r890096 = r890094 * r890095;
return r890096;
}



Bits error versus x
Initial program 0.3
rmApplied *-un-lft-identity0.3
Applied add-sqr-sqrt0.3
Applied difference-of-squares0.4
Applied times-frac0.4
Simplified0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019170 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
(/ (- 1.0 (* (tan x) (tan x))) (+ 1.0 (* (tan x) (tan x)))))