\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\log \left(e^{1 + \tan x}\right) \cdot \left(1 - \tan x\right)}{1 + \tan x \cdot \tan x}double f(double x) {
double r3503851 = 1.0;
double r3503852 = x;
double r3503853 = tan(r3503852);
double r3503854 = r3503853 * r3503853;
double r3503855 = r3503851 - r3503854;
double r3503856 = r3503851 + r3503854;
double r3503857 = r3503855 / r3503856;
return r3503857;
}
double f(double x) {
double r3503858 = 1.0;
double r3503859 = x;
double r3503860 = tan(r3503859);
double r3503861 = r3503858 + r3503860;
double r3503862 = exp(r3503861);
double r3503863 = log(r3503862);
double r3503864 = r3503858 - r3503860;
double r3503865 = r3503863 * r3503864;
double r3503866 = r3503860 * r3503860;
double r3503867 = r3503858 + r3503866;
double r3503868 = r3503865 / r3503867;
return r3503868;
}



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