\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 r19558 = 1.0;
double r19559 = x;
double r19560 = tan(r19559);
double r19561 = r19560 * r19560;
double r19562 = r19558 - r19561;
double r19563 = r19558 + r19561;
double r19564 = r19562 / r19563;
return r19564;
}
double f(double x) {
double r19565 = 1.0;
double r19566 = x;
double r19567 = tan(r19566);
double r19568 = r19567 * r19567;
double r19569 = r19565 - r19568;
double r19570 = 1.0;
double r19571 = fma(r19567, r19567, r19565);
double r19572 = r19570 / r19571;
double r19573 = r19569 * r19572;
return r19573;
}



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)))))