\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\mathsf{fma}\left(-\frac{\sin x}{\cos x}, \tan x, \tan x \cdot \frac{\sin x}{\cos x}\right) + \mathsf{fma}\left(1, 1, \frac{\sin x}{\cos x} \cdot \left(-\tan x\right)\right)}{\tan x \cdot \tan x + 1}\right)\right)double f(double x) {
double r492323 = 1.0;
double r492324 = x;
double r492325 = tan(r492324);
double r492326 = r492325 * r492325;
double r492327 = r492323 - r492326;
double r492328 = r492323 + r492326;
double r492329 = r492327 / r492328;
return r492329;
}
double f(double x) {
double r492330 = x;
double r492331 = sin(r492330);
double r492332 = cos(r492330);
double r492333 = r492331 / r492332;
double r492334 = -r492333;
double r492335 = tan(r492330);
double r492336 = r492335 * r492333;
double r492337 = fma(r492334, r492335, r492336);
double r492338 = 1.0;
double r492339 = -r492335;
double r492340 = r492333 * r492339;
double r492341 = fma(r492338, r492338, r492340);
double r492342 = r492337 + r492341;
double r492343 = r492335 * r492335;
double r492344 = r492343 + r492338;
double r492345 = r492342 / r492344;
double r492346 = expm1(r492345);
double r492347 = log1p(r492346);
return r492347;
}



Bits error versus x
Initial program 0.3
rmApplied log1p-expm1-u0.4
rmApplied tan-quot0.4
Applied associate-*r/0.4
rmApplied *-un-lft-identity0.4
Applied times-frac0.4
Applied *-un-lft-identity0.4
Applied prod-diff0.4
Final simplification0.4
herbie shell --seed 2019146 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))