\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 r11375 = 1.0;
double r11376 = x;
double r11377 = tan(r11376);
double r11378 = r11377 * r11377;
double r11379 = r11375 - r11378;
double r11380 = r11375 + r11378;
double r11381 = r11379 / r11380;
return r11381;
}
double f(double x) {
double r11382 = 1.0;
double r11383 = x;
double r11384 = tan(r11383);
double r11385 = r11384 * r11384;
double r11386 = r11382 - r11385;
double r11387 = r11382 + r11385;
double r11388 = r11386 / r11387;
double r11389 = exp(r11388);
double r11390 = log(r11389);
return r11390;
}



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)))))