\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\left(\tan x + \sqrt{1}\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 r14939 = 1.0;
double r14940 = x;
double r14941 = tan(r14940);
double r14942 = r14941 * r14941;
double r14943 = r14939 - r14942;
double r14944 = r14939 + r14942;
double r14945 = r14943 / r14944;
return r14945;
}
double f(double x) {
double r14946 = x;
double r14947 = tan(r14946);
double r14948 = 1.0;
double r14949 = sqrt(r14948);
double r14950 = r14947 + r14949;
double r14951 = r14947 * r14947;
double r14952 = r14948 - r14951;
double r14953 = r14949 + r14947;
double r14954 = r14952 / r14953;
double r14955 = r14948 + r14951;
double r14956 = r14954 / r14955;
double r14957 = r14950 * r14956;
return r14957;
}



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
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))