\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\mathsf{fma}\left(-\tan x, \tan x, \tan x \cdot \tan x\right) + \left(1 - \tan x \cdot \tan x\right)}{\tan x \cdot \tan x + 1}double f(double x) {
double r735008 = 1.0;
double r735009 = x;
double r735010 = tan(r735009);
double r735011 = r735010 * r735010;
double r735012 = r735008 - r735011;
double r735013 = r735008 + r735011;
double r735014 = r735012 / r735013;
return r735014;
}
double f(double x) {
double r735015 = x;
double r735016 = tan(r735015);
double r735017 = -r735016;
double r735018 = r735016 * r735016;
double r735019 = fma(r735017, r735016, r735018);
double r735020 = 1.0;
double r735021 = r735020 - r735018;
double r735022 = r735019 + r735021;
double r735023 = r735018 + r735020;
double r735024 = r735022 / r735023;
return r735024;
}



Bits error versus x
Initial program 0.3
rmApplied add-sqr-sqrt0.3
Applied prod-diff0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019172 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
(/ (- 1.0 (* (tan x) (tan x))) (+ 1.0 (* (tan x) (tan x)))))