\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}double f(double x) {
double r11282 = 1.0;
double r11283 = x;
double r11284 = tan(r11283);
double r11285 = r11284 * r11284;
double r11286 = r11282 - r11285;
double r11287 = r11282 + r11285;
double r11288 = r11286 / r11287;
return r11288;
}
double f(double x) {
double r11289 = 1.0;
double r11290 = x;
double r11291 = tan(r11290);
double r11292 = r11291 * r11291;
double r11293 = r11289 - r11292;
double r11294 = r11289 + r11292;
double r11295 = r11293 / r11294;
return r11295;
}



Bits error versus x
Results
Initial program 0.3
rmApplied *-un-lft-identity0.3
Applied add-sqr-sqrt0.3
Applied difference-of-squares0.3
Applied times-frac0.4
Simplified0.4
rmApplied *-un-lft-identity0.4
Applied associate-*l*0.4
Simplified0.3
Final simplification0.3
herbie shell --seed 2020047
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))