\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{\left(1 + \tan x \cdot \tan x\right) \cdot \left(1 - \frac{\sin x \cdot \tan x}{\cos x}\right)}{\left(1 + \tan x \cdot \tan x\right) \cdot 1 + \left(1 + \tan x \cdot \tan x\right) \cdot \left(\tan x \cdot \tan x\right)}double f(double x) {
double r743967 = 1.0;
double r743968 = x;
double r743969 = tan(r743968);
double r743970 = r743969 * r743969;
double r743971 = r743967 - r743970;
double r743972 = r743967 + r743970;
double r743973 = r743971 / r743972;
return r743973;
}
double f(double x) {
double r743974 = 1.0;
double r743975 = x;
double r743976 = tan(r743975);
double r743977 = r743976 * r743976;
double r743978 = r743974 + r743977;
double r743979 = sin(r743975);
double r743980 = r743979 * r743976;
double r743981 = cos(r743975);
double r743982 = r743980 / r743981;
double r743983 = r743974 - r743982;
double r743984 = r743978 * r743983;
double r743985 = r743978 * r743974;
double r743986 = r743978 * r743977;
double r743987 = r743985 + r743986;
double r743988 = r743984 / r743987;
return r743988;
}



Bits error versus x
Results
Initial program 0.3
rmApplied div-inv0.4
rmApplied flip--0.4
Applied frac-times0.4
Simplified0.4
Simplified0.4
rmApplied tan-quot0.4
Applied associate-*l/0.4
rmApplied distribute-lft-in0.4
Final simplification0.4
herbie shell --seed 2019174
(FPCore (x)
:name "Trigonometry B"
(/ (- 1.0 (* (tan x) (tan x))) (+ 1.0 (* (tan x) (tan x)))))