\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\sqrt{1} + \tan x}{\frac{1 + \tan x \cdot \tan x}{\sqrt{1} - \tan x}}double f(double x) {
double r11152 = 1.0;
double r11153 = x;
double r11154 = tan(r11153);
double r11155 = r11154 * r11154;
double r11156 = r11152 - r11155;
double r11157 = r11152 + r11155;
double r11158 = r11156 / r11157;
return r11158;
}
double f(double x) {
double r11159 = 1.0;
double r11160 = sqrt(r11159);
double r11161 = x;
double r11162 = tan(r11161);
double r11163 = r11160 + r11162;
double r11164 = r11162 * r11162;
double r11165 = r11159 + r11164;
double r11166 = r11160 - r11162;
double r11167 = r11165 / r11166;
double r11168 = r11163 / r11167;
return r11168;
}



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