\frac{3 \cdot \tan x - {\left(\tan x\right)}^{3}}{1 - 3 \cdot {\left(\tan x\right)}^{2}}\frac{3 \cdot \tan x - {\left(\tan x\right)}^{3}}{1 - 3 \cdot {\left(\tan x\right)}^{2}}double code(double x) {
return ((double) (((double) (((double) (3.0 * ((double) tan(x)))) - ((double) pow(((double) tan(x)), 3.0)))) / ((double) (1.0 - ((double) (3.0 * ((double) pow(((double) tan(x)), 2.0))))))));
}
double code(double x) {
return ((double) (((double) (((double) (3.0 * ((double) tan(x)))) - ((double) pow(((double) tan(x)), 3.0)))) / ((double) (1.0 - ((double) (3.0 * ((double) pow(((double) tan(x)), 2.0))))))));
}



Bits error versus x
Results
Initial program 0.6
Final simplification0.6
herbie shell --seed 2020153
(FPCore (x)
:name "(/ (- (* 3 (tan x)) (pow (tan x) 3)) (- 1 (* 3 (pow (tan x) 2))))"
:precision binary64
(/ (- (* 3.0 (tan x)) (pow (tan x) 3.0)) (- 1.0 (* 3.0 (pow (tan x) 2.0)))))