\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 r11330 = 1.0;
double r11331 = x;
double r11332 = tan(r11331);
double r11333 = r11332 * r11332;
double r11334 = r11330 - r11333;
double r11335 = r11330 + r11333;
double r11336 = r11334 / r11335;
return r11336;
}
double f(double x) {
double r11337 = 1.0;
double r11338 = x;
double r11339 = tan(r11338);
double r11340 = r11339 * r11339;
double r11341 = r11337 - r11340;
double r11342 = r11337 + r11340;
double r11343 = r11341 / r11342;
double r11344 = exp(r11343);
double r11345 = log(r11344);
return r11345;
}



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