double f(double x) {
double r1147112 = 1.0;
double r1147113 = x;
double r1147114 = tan(r1147113);
double r1147115 = r1147114 * r1147114;
double r1147116 = r1147112 - r1147115;
double r1147117 = r1147112 + r1147115;
double r1147118 = r1147116 / r1147117;
return r1147118;
}
double f(double x) {
double r1147119 = 1.0;
double r1147120 = x;
double r1147121 = sin(r1147120);
double r1147122 = cos(r1147120);
double r1147123 = r1147121 / r1147122;
double r1147124 = tan(r1147120);
double r1147125 = r1147123 * r1147124;
double r1147126 = r1147119 - r1147125;
double r1147127 = exp(r1147123);
double r1147128 = log(r1147127);
double r1147129 = fma(r1147128, r1147123, r1147119);
double r1147130 = r1147126 / r1147129;
return r1147130;
}
\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1 - \frac{\sin x}{\cos x} \cdot \tan x}{(\left(\log \left(e^{\frac{\sin x}{\cos x}}\right)\right) \cdot \left(\frac{\sin x}{\cos x}\right) + 1)_*}


Bits error versus x
Initial program 0.3
Taylor expanded around -inf 0.4
Simplified0.4
rmApplied quot-tan0.4
rmApplied add-log-exp0.4
Final simplification0.4
herbie shell --seed 2019101 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))