Average Error: 0.3 → 0.4
Time: 39.5s
Precision: 64
\[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
\[\frac{1 - \frac{\tan x \cdot \sin x}{\cos x}}{1 + \sqrt[3]{\left(\tan x \cdot \left(\tan x \cdot \tan x\right)\right) \cdot \left(\tan x \cdot \left(\tan x \cdot \tan x\right)\right)}}\]
\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}
\frac{1 - \frac{\tan x \cdot \sin x}{\cos x}}{1 + \sqrt[3]{\left(\tan x \cdot \left(\tan x \cdot \tan x\right)\right) \cdot \left(\tan x \cdot \left(\tan x \cdot \tan x\right)\right)}}
double f(double x) {
        double r561735 = 1.0;
        double r561736 = x;
        double r561737 = tan(r561736);
        double r561738 = r561737 * r561737;
        double r561739 = r561735 - r561738;
        double r561740 = r561735 + r561738;
        double r561741 = r561739 / r561740;
        return r561741;
}

double f(double x) {
        double r561742 = 1.0;
        double r561743 = x;
        double r561744 = tan(r561743);
        double r561745 = sin(r561743);
        double r561746 = r561744 * r561745;
        double r561747 = cos(r561743);
        double r561748 = r561746 / r561747;
        double r561749 = r561742 - r561748;
        double r561750 = r561744 * r561744;
        double r561751 = r561744 * r561750;
        double r561752 = r561751 * r561751;
        double r561753 = cbrt(r561752);
        double r561754 = r561742 + r561753;
        double r561755 = r561749 / r561754;
        return r561755;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.3

    \[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
  2. Using strategy rm
  3. Applied tan-quot0.4

    \[\leadsto \frac{1 - \tan x \cdot \color{blue}{\frac{\sin x}{\cos x}}}{1 + \tan x \cdot \tan x}\]
  4. Applied associate-*r/0.4

    \[\leadsto \frac{1 - \color{blue}{\frac{\tan x \cdot \sin x}{\cos x}}}{1 + \tan x \cdot \tan x}\]
  5. Using strategy rm
  6. Applied add-cbrt-cube0.4

    \[\leadsto \frac{1 - \frac{\tan x \cdot \sin x}{\cos x}}{1 + \tan x \cdot \color{blue}{\sqrt[3]{\left(\tan x \cdot \tan x\right) \cdot \tan x}}}\]
  7. Applied add-cbrt-cube0.5

    \[\leadsto \frac{1 - \frac{\tan x \cdot \sin x}{\cos x}}{1 + \color{blue}{\sqrt[3]{\left(\tan x \cdot \tan x\right) \cdot \tan x}} \cdot \sqrt[3]{\left(\tan x \cdot \tan x\right) \cdot \tan x}}\]
  8. Applied cbrt-unprod0.4

    \[\leadsto \frac{1 - \frac{\tan x \cdot \sin x}{\cos x}}{1 + \color{blue}{\sqrt[3]{\left(\left(\tan x \cdot \tan x\right) \cdot \tan x\right) \cdot \left(\left(\tan x \cdot \tan x\right) \cdot \tan x\right)}}}\]
  9. Final simplification0.4

    \[\leadsto \frac{1 - \frac{\tan x \cdot \sin x}{\cos x}}{1 + \sqrt[3]{\left(\tan x \cdot \left(\tan x \cdot \tan x\right)\right) \cdot \left(\tan x \cdot \left(\tan x \cdot \tan x\right)\right)}}\]

Reproduce

herbie shell --seed 2019149 
(FPCore (x)
  :name "Trigonometry B"
  (/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))