\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1}{\frac{1}{\sqrt{1} - \tan x}} \cdot \frac{\tan x + \sqrt{1}}{\mathsf{fma}\left(\tan x, \tan x, 1\right)}double f(double x) {
double r859247 = 1.0;
double r859248 = x;
double r859249 = tan(r859248);
double r859250 = r859249 * r859249;
double r859251 = r859247 - r859250;
double r859252 = r859247 + r859250;
double r859253 = r859251 / r859252;
return r859253;
}
double f(double x) {
double r859254 = 1.0;
double r859255 = 1.0;
double r859256 = sqrt(r859255);
double r859257 = x;
double r859258 = tan(r859257);
double r859259 = r859256 - r859258;
double r859260 = r859254 / r859259;
double r859261 = r859254 / r859260;
double r859262 = r859258 + r859256;
double r859263 = fma(r859258, r859258, r859255);
double r859264 = r859262 / r859263;
double r859265 = r859261 * r859264;
return r859265;
}



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
rmApplied clear-num0.4
rmApplied div-inv0.4
Applied *-un-lft-identity0.4
Applied times-frac0.4
Applied associate-*r*0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019169 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
(/ (- 1.0 (* (tan x) (tan x))) (+ 1.0 (* (tan x) (tan x)))))