\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1 - \tan x \cdot \tan x}{\mathsf{fma}\left(\tan x, \tan x, 1\right)}\right)\right)double f(double x) {
double r272353 = 1.0;
double r272354 = x;
double r272355 = tan(r272354);
double r272356 = r272355 * r272355;
double r272357 = r272353 - r272356;
double r272358 = r272353 + r272356;
double r272359 = r272357 / r272358;
return r272359;
}
double f(double x) {
double r272360 = 1.0;
double r272361 = x;
double r272362 = tan(r272361);
double r272363 = r272362 * r272362;
double r272364 = r272360 - r272363;
double r272365 = fma(r272362, r272362, r272360);
double r272366 = r272364 / r272365;
double r272367 = log1p(r272366);
double r272368 = expm1(r272367);
return r272368;
}



Bits error versus x
Initial program 0.3
rmApplied clear-num0.4
rmApplied *-un-lft-identity0.4
Applied *-un-lft-identity0.4
Applied times-frac0.4
Applied add-cube-cbrt0.4
Applied times-frac0.4
Simplified0.4
Simplified0.3
rmApplied expm1-log1p-u0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019154 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))