Average Error: 27.4 → 2.7
Time: 23.9s
Precision: 64
\[\frac{\cos \left(2 \cdot x\right)}{{cos}^{2} \cdot \left(\left(x \cdot {sin}^{2}\right) \cdot x\right)}\]
\[\cos \left(x \cdot 2\right) \cdot {\left(\left(sin \cdot x\right) \cdot cos\right)}^{-2}\]
\frac{\cos \left(2 \cdot x\right)}{{cos}^{2} \cdot \left(\left(x \cdot {sin}^{2}\right) \cdot x\right)}
\cos \left(x \cdot 2\right) \cdot {\left(\left(sin \cdot x\right) \cdot cos\right)}^{-2}
double f(double x, double cos, double sin) {
        double r2180083 = 2.0;
        double r2180084 = x;
        double r2180085 = r2180083 * r2180084;
        double r2180086 = cos(r2180085);
        double r2180087 = cos;
        double r2180088 = pow(r2180087, r2180083);
        double r2180089 = sin;
        double r2180090 = pow(r2180089, r2180083);
        double r2180091 = r2180084 * r2180090;
        double r2180092 = r2180091 * r2180084;
        double r2180093 = r2180088 * r2180092;
        double r2180094 = r2180086 / r2180093;
        return r2180094;
}

double f(double x, double cos, double sin) {
        double r2180095 = x;
        double r2180096 = 2.0;
        double r2180097 = r2180095 * r2180096;
        double r2180098 = cos(r2180097);
        double r2180099 = sin;
        double r2180100 = r2180099 * r2180095;
        double r2180101 = cos;
        double r2180102 = r2180100 * r2180101;
        double r2180103 = -2.0;
        double r2180104 = pow(r2180102, r2180103);
        double r2180105 = r2180098 * r2180104;
        return r2180105;
}

Error

Bits error versus x

Bits error versus cos

Bits error versus sin

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 27.4

    \[\frac{\cos \left(2 \cdot x\right)}{{cos}^{2} \cdot \left(\left(x \cdot {sin}^{2}\right) \cdot x\right)}\]
  2. Simplified2.7

    \[\leadsto \color{blue}{\frac{\cos \left(2 \cdot x\right)}{\left(sin \cdot \left(x \cdot cos\right)\right) \cdot \left(sin \cdot \left(x \cdot cos\right)\right)}}\]
  3. Using strategy rm
  4. Applied clear-num2.7

    \[\leadsto \color{blue}{\frac{1}{\frac{\left(sin \cdot \left(x \cdot cos\right)\right) \cdot \left(sin \cdot \left(x \cdot cos\right)\right)}{\cos \left(2 \cdot x\right)}}}\]
  5. Using strategy rm
  6. Applied div-inv2.7

    \[\leadsto \frac{1}{\color{blue}{\left(\left(sin \cdot \left(x \cdot cos\right)\right) \cdot \left(sin \cdot \left(x \cdot cos\right)\right)\right) \cdot \frac{1}{\cos \left(2 \cdot x\right)}}}\]
  7. Applied add-cube-cbrt2.7

    \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}{\left(\left(sin \cdot \left(x \cdot cos\right)\right) \cdot \left(sin \cdot \left(x \cdot cos\right)\right)\right) \cdot \frac{1}{\cos \left(2 \cdot x\right)}}\]
  8. Applied times-frac2.7

    \[\leadsto \color{blue}{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\left(sin \cdot \left(x \cdot cos\right)\right) \cdot \left(sin \cdot \left(x \cdot cos\right)\right)} \cdot \frac{\sqrt[3]{1}}{\frac{1}{\cos \left(2 \cdot x\right)}}}\]
  9. Simplified2.7

    \[\leadsto \color{blue}{\frac{\frac{1}{\left(sin \cdot x\right) \cdot cos}}{\left(sin \cdot x\right) \cdot cos}} \cdot \frac{\sqrt[3]{1}}{\frac{1}{\cos \left(2 \cdot x\right)}}\]
  10. Simplified2.7

    \[\leadsto \frac{\frac{1}{\left(sin \cdot x\right) \cdot cos}}{\left(sin \cdot x\right) \cdot cos} \cdot \color{blue}{\cos \left(2 \cdot x\right)}\]
  11. Using strategy rm
  12. Applied pow12.7

    \[\leadsto \frac{\frac{1}{\left(sin \cdot x\right) \cdot cos}}{\left(sin \cdot x\right) \cdot \color{blue}{{cos}^{1}}} \cdot \cos \left(2 \cdot x\right)\]
  13. Applied pow12.7

    \[\leadsto \frac{\frac{1}{\left(sin \cdot x\right) \cdot cos}}{\left(sin \cdot \color{blue}{{x}^{1}}\right) \cdot {cos}^{1}} \cdot \cos \left(2 \cdot x\right)\]
  14. Applied pow12.7

    \[\leadsto \frac{\frac{1}{\left(sin \cdot x\right) \cdot cos}}{\left(\color{blue}{{sin}^{1}} \cdot {x}^{1}\right) \cdot {cos}^{1}} \cdot \cos \left(2 \cdot x\right)\]
  15. Applied pow-prod-down2.7

    \[\leadsto \frac{\frac{1}{\left(sin \cdot x\right) \cdot cos}}{\color{blue}{{\left(sin \cdot x\right)}^{1}} \cdot {cos}^{1}} \cdot \cos \left(2 \cdot x\right)\]
  16. Applied pow-prod-down2.7

    \[\leadsto \frac{\frac{1}{\left(sin \cdot x\right) \cdot cos}}{\color{blue}{{\left(\left(sin \cdot x\right) \cdot cos\right)}^{1}}} \cdot \cos \left(2 \cdot x\right)\]
  17. Applied inv-pow2.7

    \[\leadsto \frac{\color{blue}{{\left(\left(sin \cdot x\right) \cdot cos\right)}^{-1}}}{{\left(\left(sin \cdot x\right) \cdot cos\right)}^{1}} \cdot \cos \left(2 \cdot x\right)\]
  18. Applied pow-div2.7

    \[\leadsto \color{blue}{{\left(\left(sin \cdot x\right) \cdot cos\right)}^{\left(-1 - 1\right)}} \cdot \cos \left(2 \cdot x\right)\]
  19. Simplified2.7

    \[\leadsto {\left(\left(sin \cdot x\right) \cdot cos\right)}^{\color{blue}{-2}} \cdot \cos \left(2 \cdot x\right)\]
  20. Final simplification2.7

    \[\leadsto \cos \left(x \cdot 2\right) \cdot {\left(\left(sin \cdot x\right) \cdot cos\right)}^{-2}\]

Reproduce

herbie shell --seed 2019162 
(FPCore (x cos sin)
  :name "cos(2*x)/(cos^2(x)*sin^2(x))"
  (/ (cos (* 2 x)) (* (pow cos 2) (* (* x (pow sin 2)) x))))