\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\log \left(e^{\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}}\right)double f(double x) {
double r9078 = 1.0;
double r9079 = x;
double r9080 = tan(r9079);
double r9081 = r9080 * r9080;
double r9082 = r9078 - r9081;
double r9083 = r9078 + r9081;
double r9084 = r9082 / r9083;
return r9084;
}
double f(double x) {
double r9085 = 1.0;
double r9086 = x;
double r9087 = tan(r9086);
double r9088 = r9087 * r9087;
double r9089 = r9085 - r9088;
double r9090 = r9085 + r9088;
double r9091 = r9089 / r9090;
double r9092 = exp(r9091);
double r9093 = log(r9092);
return r9093;
}



Bits error versus x
Results
Initial program 0.3
rmApplied add-log-exp0.4
Final simplification0.4
herbie shell --seed 2020003
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))