\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\left(1 - \tan x \cdot \tan x\right) \cdot \frac{1}{\mathsf{fma}\left(\tan x, \tan x, 1\right)}double f(double x) {
double r19520 = 1.0;
double r19521 = x;
double r19522 = tan(r19521);
double r19523 = r19522 * r19522;
double r19524 = r19520 - r19523;
double r19525 = r19520 + r19523;
double r19526 = r19524 / r19525;
return r19526;
}
double f(double x) {
double r19527 = 1.0;
double r19528 = x;
double r19529 = tan(r19528);
double r19530 = r19529 * r19529;
double r19531 = r19527 - r19530;
double r19532 = 1.0;
double r19533 = fma(r19529, r19529, r19527);
double r19534 = r19532 / r19533;
double r19535 = r19531 * r19534;
return r19535;
}



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