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 r22083 = 1.0;
        double r22084 = x;
        double r22085 = tan(r22084);
        double r22086 = r22085 * r22085;
        double r22087 = r22083 - r22086;
        double r22088 = r22083 + r22086;
        double r22089 = r22087 / r22088;
        return r22089;
}

double f(double x) {
        double r22090 = 1.0;
        double r22091 = x;
        double r22092 = tan(r22091);
        double r22093 = sin(r22091);
        double r22094 = r22092 * r22093;
        double r22095 = cos(r22091);
        double r22096 = r22094 / r22095;
        double r22097 = r22090 - r22096;
        double r22098 = 3.0;
        double r22099 = pow(r22096, r22098);
        double r22100 = cbrt(r22099);
        double r22101 = r22090 + r22100;
        double r22102 = r22097 / r22101;
        return r22102;
}

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)))))