\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1 - \frac{{\left(\sin x\right)}^{2}}{\mathsf{expm1}\left(\mathsf{log1p}\left({\left(\cos x\right)}^{2}\right)\right)}}{\frac{{\left(\sin x\right)}^{2}}{{\left(\cos x\right)}^{2}} + 1}double f(double x) {
double r21534 = 1.0;
double r21535 = x;
double r21536 = tan(r21535);
double r21537 = r21536 * r21536;
double r21538 = r21534 - r21537;
double r21539 = r21534 + r21537;
double r21540 = r21538 / r21539;
return r21540;
}
double f(double x) {
double r21541 = 1.0;
double r21542 = x;
double r21543 = sin(r21542);
double r21544 = 2.0;
double r21545 = pow(r21543, r21544);
double r21546 = cos(r21542);
double r21547 = pow(r21546, r21544);
double r21548 = log1p(r21547);
double r21549 = expm1(r21548);
double r21550 = r21545 / r21549;
double r21551 = r21541 - r21550;
double r21552 = r21545 / r21547;
double r21553 = r21552 + r21541;
double r21554 = r21551 / r21553;
return r21554;
}



Bits error versus x
Results
Initial program 0.3
Simplified0.3
Taylor expanded around inf 0.4
rmApplied expm1-log1p-u0.4
Final simplification0.4
herbie shell --seed 2019208 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))