\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\mathsf{fma}\left(\tan x, -\tan x, 1\right)}{\mathsf{fma}\left(\tan x, \tan x, 1\right)}\right)\right)double f(double x) {
double r21175 = 1.0;
double r21176 = x;
double r21177 = tan(r21176);
double r21178 = r21177 * r21177;
double r21179 = r21175 - r21178;
double r21180 = r21175 + r21178;
double r21181 = r21179 / r21180;
return r21181;
}
double f(double x) {
double r21182 = x;
double r21183 = tan(r21182);
double r21184 = -r21183;
double r21185 = 1.0;
double r21186 = fma(r21183, r21184, r21185);
double r21187 = fma(r21183, r21183, r21185);
double r21188 = r21186 / r21187;
double r21189 = log1p(r21188);
double r21190 = expm1(r21189);
return r21190;
}



Bits error versus x
Initial program 0.3
Simplified0.3
rmApplied *-un-lft-identity0.3
Applied associate-/r*0.3
Simplified0.3
rmApplied expm1-log1p-u0.4
Final simplification0.4
herbie shell --seed 2019303 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))