\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\left(1 - \tan x \cdot \tan x\right) \cdot \left(\frac{1}{1 \cdot 1 - \left(\tan x \cdot \tan x\right) \cdot \left(\tan x \cdot \tan x\right)} - \frac{\tan x \cdot \tan x}{1 \cdot 1 - \left(\tan x \cdot \tan x\right) \cdot \left(\tan x \cdot \tan x\right)}\right)double code(double x) {
return ((double) (((double) (1.0 - ((double) (((double) tan(x)) * ((double) tan(x)))))) / ((double) (1.0 + ((double) (((double) tan(x)) * ((double) tan(x))))))));
}
double code(double x) {
return ((double) (((double) (1.0 - ((double) (((double) tan(x)) * ((double) tan(x)))))) * ((double) (((double) (1.0 / ((double) (((double) (1.0 * 1.0)) - ((double) (((double) (((double) tan(x)) * ((double) tan(x)))) * ((double) (((double) tan(x)) * ((double) tan(x)))))))))) - ((double) (((double) (((double) tan(x)) * ((double) tan(x)))) / ((double) (((double) (1.0 * 1.0)) - ((double) (((double) (((double) tan(x)) * ((double) tan(x)))) * ((double) (((double) tan(x)) * ((double) tan(x))))))))))))));
}



Bits error versus x
Results
Initial program 0.3
rmApplied div-sub0.4
rmApplied flip-+0.5
Applied associate-/r/0.5
Applied flip-+0.5
Applied associate-/r/0.5
Applied distribute-rgt-out--0.4
Final simplification0.4
herbie shell --seed 2020153
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1.0 (* (tan x) (tan x))) (+ 1.0 (* (tan x) (tan x)))))