\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\log \left(e^{1 - \tan x \cdot \tan x}\right)}{\tan x \cdot \tan x + 1}double f(double x) {
double r606014 = 1.0;
double r606015 = x;
double r606016 = tan(r606015);
double r606017 = r606016 * r606016;
double r606018 = r606014 - r606017;
double r606019 = r606014 + r606017;
double r606020 = r606018 / r606019;
return r606020;
}
double f(double x) {
double r606021 = 1.0;
double r606022 = x;
double r606023 = tan(r606022);
double r606024 = r606023 * r606023;
double r606025 = r606021 - r606024;
double r606026 = exp(r606025);
double r606027 = log(r606026);
double r606028 = r606024 + r606021;
double r606029 = r606027 / r606028;
return r606029;
}



Bits error versus x
Results
Initial program 0.3
rmApplied add-log-exp1.2
Applied add-log-exp1.2
Applied diff-log1.2
Simplified1.2
Final simplification1.2
herbie shell --seed 2019172 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
(/ (- 1.0 (* (tan x) (tan x))) (+ 1.0 (* (tan x) (tan x)))))