\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\log \left(e^{1 - \frac{\sin x}{\cos x}}\right) \cdot \left(1 + \frac{\sin x}{\cos x}\right)}{1 + \frac{\sin x}{\cos x} \cdot \frac{\sin x}{\cos x}}double f(double x) {
double r543444 = 1.0;
double r543445 = x;
double r543446 = tan(r543445);
double r543447 = r543446 * r543446;
double r543448 = r543444 - r543447;
double r543449 = r543444 + r543447;
double r543450 = r543448 / r543449;
return r543450;
}
double f(double x) {
double r543451 = 1.0;
double r543452 = x;
double r543453 = sin(r543452);
double r543454 = cos(r543452);
double r543455 = r543453 / r543454;
double r543456 = r543451 - r543455;
double r543457 = exp(r543456);
double r543458 = log(r543457);
double r543459 = r543451 + r543455;
double r543460 = r543458 * r543459;
double r543461 = r543455 * r543455;
double r543462 = r543451 + r543461;
double r543463 = r543460 / r543462;
return r543463;
}



Bits error versus x
Results
Initial program 0.3
rmApplied *-un-lft-identity0.3
Applied difference-of-squares0.3
Taylor expanded around inf 0.5
Simplified0.4
rmApplied add-log-exp0.4
Applied add-log-exp0.4
Applied diff-log0.5
Simplified0.4
Final simplification0.4
herbie shell --seed 2019141
(FPCore (x)
:name "Trigonometry B"
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))