\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\left(\sqrt{1} + \tan x\right) \cdot \frac{\frac{1 - \tan x \cdot \tan x}{\sqrt{1} + \tan x}}{1 + \tan x \cdot \tan x}double f(double x) {
double r11549 = 1.0;
double r11550 = x;
double r11551 = tan(r11550);
double r11552 = r11551 * r11551;
double r11553 = r11549 - r11552;
double r11554 = r11549 + r11552;
double r11555 = r11553 / r11554;
return r11555;
}
double f(double x) {
double r11556 = 1.0;
double r11557 = sqrt(r11556);
double r11558 = x;
double r11559 = tan(r11558);
double r11560 = r11557 + r11559;
double r11561 = r11559 * r11559;
double r11562 = r11556 - r11561;
double r11563 = r11562 / r11560;
double r11564 = r11556 + r11561;
double r11565 = r11563 / r11564;
double r11566 = r11560 * r11565;
return r11566;
}



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 flip--0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2020047 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))