\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(\left(\tan x\right), \left(\tan x\right), 1\right)}double f(double x) {
double r495913 = 1.0;
double r495914 = x;
double r495915 = tan(r495914);
double r495916 = r495915 * r495915;
double r495917 = r495913 - r495916;
double r495918 = r495913 + r495916;
double r495919 = r495917 / r495918;
return r495919;
}
double f(double x) {
double r495920 = 1.0;
double r495921 = x;
double r495922 = tan(r495921);
double r495923 = r495920 + r495922;
double r495924 = r495920 - r495922;
double r495925 = fma(r495922, r495922, r495920);
double r495926 = r495924 / r495925;
double r495927 = r495923 * r495926;
return r495927;
}



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 2019132 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))