\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\left(1 + \tan x\right) \cdot \left(1 - \tan x \cdot \tan x\right)}{\left(\tan x \cdot \tan x + 1\right) \cdot \left(1 + \tan x\right)}double f(double x) {
double r574968 = 1.0;
double r574969 = x;
double r574970 = tan(r574969);
double r574971 = r574970 * r574970;
double r574972 = r574968 - r574971;
double r574973 = r574968 + r574971;
double r574974 = r574972 / r574973;
return r574974;
}
double f(double x) {
double r574975 = 1.0;
double r574976 = x;
double r574977 = tan(r574976);
double r574978 = r574975 + r574977;
double r574979 = r574977 * r574977;
double r574980 = r574975 - r574979;
double r574981 = r574978 * r574980;
double r574982 = r574979 + r574975;
double r574983 = r574982 * r574978;
double r574984 = r574981 / r574983;
return r574984;
}



Bits error versus x
Results
Initial program 0.3
rmApplied *-un-lft-identity0.3
Applied difference-of-squares0.4
rmApplied flip--0.3
Applied associate-*r/0.4
Applied associate-/l/0.4
Final simplification0.4
herbie shell --seed 2019162 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))