\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\left(1 + \tan x\right) \cdot \frac{1 - \tan x}{\mathsf{fma}\left(\tan x, \tan x, 1\right)}double f(double x) {
double r290489 = 1.0;
double r290490 = x;
double r290491 = tan(r290490);
double r290492 = r290491 * r290491;
double r290493 = r290489 - r290492;
double r290494 = r290489 + r290492;
double r290495 = r290493 / r290494;
return r290495;
}
double f(double x) {
double r290496 = 1.0;
double r290497 = x;
double r290498 = tan(r290497);
double r290499 = r290496 + r290498;
double r290500 = r290496 - r290498;
double r290501 = fma(r290498, r290498, r290496);
double r290502 = r290500 / r290501;
double r290503 = r290499 * r290502;
return r290503;
}



Bits error versus x
Initial program 0.3
rmApplied *-un-lft-identity0.3
Applied add-sqr-sqrt0.3
Applied difference-of-squares0.4
Applied times-frac0.4
Simplified0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019152 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))