\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 r701228 = 1.0;
double r701229 = x;
double r701230 = tan(r701229);
double r701231 = r701230 * r701230;
double r701232 = r701228 - r701231;
double r701233 = r701228 + r701231;
double r701234 = r701232 / r701233;
return r701234;
}
double f(double x) {
double r701235 = 1.0;
double r701236 = x;
double r701237 = tan(r701236);
double r701238 = r701235 + r701237;
double r701239 = r701235 - r701237;
double r701240 = fma(r701237, r701237, r701235);
double r701241 = r701239 / r701240;
double r701242 = r701238 * r701241;
return r701242;
}



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