\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1}{\mathsf{fma}\left(\tan x, \tan x, 1\right)} \cdot \left(1 - \tan x \cdot \tan x\right)double f(double x) {
double r18396 = 1.0;
double r18397 = x;
double r18398 = tan(r18397);
double r18399 = r18398 * r18398;
double r18400 = r18396 - r18399;
double r18401 = r18396 + r18399;
double r18402 = r18400 / r18401;
return r18402;
}
double f(double x) {
double r18403 = 1.0;
double r18404 = x;
double r18405 = tan(r18404);
double r18406 = 1.0;
double r18407 = fma(r18405, r18405, r18406);
double r18408 = r18403 / r18407;
double r18409 = r18405 * r18405;
double r18410 = r18406 - r18409;
double r18411 = r18408 * r18410;
return r18411;
}



Bits error versus x
Initial program 0.3
Simplified0.3
rmApplied clear-num0.4
rmApplied div-inv0.4
Applied add-cube-cbrt0.4
Applied times-frac0.4
Simplified0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019325 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))