Average Error: 0.3 → 0.4
Time: 17.0s
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(\frac{\tan x \cdot \sin x}{\cos x}\right)}^{3}}}\]
\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(\frac{\tan x \cdot \sin x}{\cos x}\right)}^{3}}}
double f(double x) {
        double r22090 = 1.0;
        double r22091 = x;
        double r22092 = tan(r22091);
        double r22093 = r22092 * r22092;
        double r22094 = r22090 - r22093;
        double r22095 = r22090 + r22093;
        double r22096 = r22094 / r22095;
        return r22096;
}

double f(double x) {
        double r22097 = 1.0;
        double r22098 = x;
        double r22099 = tan(r22098);
        double r22100 = sin(r22098);
        double r22101 = r22099 * r22100;
        double r22102 = cos(r22098);
        double r22103 = r22101 / r22102;
        double r22104 = r22097 - r22103;
        double r22105 = 3.0;
        double r22106 = pow(r22103, r22105);
        double r22107 = cbrt(r22106);
        double r22108 = r22097 + r22107;
        double r22109 = r22104 / r22108;
        return r22109;
}

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 tan-quot0.4

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

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

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

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

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

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

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

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

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

Reproduce

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