\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1}{\frac{\mathsf{fma}\left(\tan x, \tan x, 1\right)}{1 - \tan x \cdot \tan x}}double f(double x) {
double r14264 = 1.0;
double r14265 = x;
double r14266 = tan(r14265);
double r14267 = r14266 * r14266;
double r14268 = r14264 - r14267;
double r14269 = r14264 + r14267;
double r14270 = r14268 / r14269;
return r14270;
}
double f(double x) {
double r14271 = 1.0;
double r14272 = x;
double r14273 = tan(r14272);
double r14274 = 1.0;
double r14275 = fma(r14273, r14273, r14274);
double r14276 = r14273 * r14273;
double r14277 = r14274 - r14276;
double r14278 = r14275 / r14277;
double r14279 = r14271 / r14278;
return r14279;
}



Bits error versus x
Initial program 0.3
rmApplied clear-num0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019354 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))