Average Error: 27.3 → 3.0
Time: 44.0s
Precision: 64
\[\frac{\cos \left(2 \cdot x\right)}{{cos}^{2} \cdot \left(\left(x \cdot {sin}^{2}\right) \cdot x\right)}\]
\[\left(\left(\sqrt[3]{\frac{\sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(cos \cdot x\right) \cdot sin}} \cdot \sqrt[3]{\frac{\sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(cos \cdot x\right) \cdot sin}}\right) \cdot \sqrt[3]{\frac{\sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(cos \cdot x\right) \cdot sin}}\right) \cdot \frac{\sqrt[3]{\cos \left(2 \cdot x\right)} \cdot \sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(cos \cdot x\right) \cdot sin}\]
\frac{\cos \left(2 \cdot x\right)}{{cos}^{2} \cdot \left(\left(x \cdot {sin}^{2}\right) \cdot x\right)}
\left(\left(\sqrt[3]{\frac{\sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(cos \cdot x\right) \cdot sin}} \cdot \sqrt[3]{\frac{\sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(cos \cdot x\right) \cdot sin}}\right) \cdot \sqrt[3]{\frac{\sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(cos \cdot x\right) \cdot sin}}\right) \cdot \frac{\sqrt[3]{\cos \left(2 \cdot x\right)} \cdot \sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(cos \cdot x\right) \cdot sin}
double f(double x, double cos, double sin) {
        double r2863458 = 2.0;
        double r2863459 = x;
        double r2863460 = r2863458 * r2863459;
        double r2863461 = cos(r2863460);
        double r2863462 = cos;
        double r2863463 = pow(r2863462, r2863458);
        double r2863464 = sin;
        double r2863465 = pow(r2863464, r2863458);
        double r2863466 = r2863459 * r2863465;
        double r2863467 = r2863466 * r2863459;
        double r2863468 = r2863463 * r2863467;
        double r2863469 = r2863461 / r2863468;
        return r2863469;
}

double f(double x, double cos, double sin) {
        double r2863470 = 2.0;
        double r2863471 = x;
        double r2863472 = r2863470 * r2863471;
        double r2863473 = cos(r2863472);
        double r2863474 = cbrt(r2863473);
        double r2863475 = cos;
        double r2863476 = r2863475 * r2863471;
        double r2863477 = sin;
        double r2863478 = r2863476 * r2863477;
        double r2863479 = r2863474 / r2863478;
        double r2863480 = cbrt(r2863479);
        double r2863481 = r2863480 * r2863480;
        double r2863482 = r2863481 * r2863480;
        double r2863483 = r2863474 * r2863474;
        double r2863484 = r2863483 / r2863478;
        double r2863485 = r2863482 * r2863484;
        return r2863485;
}

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.3

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

    \[\leadsto \color{blue}{\frac{\cos \left(2 \cdot x\right)}{\left(\left(sin \cdot x\right) \cdot cos\right) \cdot \left(\left(sin \cdot x\right) \cdot cos\right)}}\]
  3. Taylor expanded around inf 30.5

    \[\leadsto \frac{\cos \left(2 \cdot x\right)}{\color{blue}{{x}^{2} \cdot \left({cos}^{2} \cdot {sin}^{2}\right)}}\]
  4. Simplified2.9

    \[\leadsto \frac{\cos \left(2 \cdot x\right)}{\color{blue}{\left(\left(cos \cdot x\right) \cdot sin\right) \cdot \left(\left(cos \cdot x\right) \cdot sin\right)}}\]
  5. Using strategy rm
  6. Applied add-cube-cbrt3.0

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

    \[\leadsto \color{blue}{\frac{\sqrt[3]{\cos \left(2 \cdot x\right)} \cdot \sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(cos \cdot x\right) \cdot sin} \cdot \frac{\sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(cos \cdot x\right) \cdot sin}}\]
  8. Using strategy rm
  9. Applied add-cube-cbrt3.0

    \[\leadsto \frac{\sqrt[3]{\cos \left(2 \cdot x\right)} \cdot \sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(cos \cdot x\right) \cdot sin} \cdot \color{blue}{\left(\left(\sqrt[3]{\frac{\sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(cos \cdot x\right) \cdot sin}} \cdot \sqrt[3]{\frac{\sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(cos \cdot x\right) \cdot sin}}\right) \cdot \sqrt[3]{\frac{\sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(cos \cdot x\right) \cdot sin}}\right)}\]
  10. Final simplification3.0

    \[\leadsto \left(\left(\sqrt[3]{\frac{\sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(cos \cdot x\right) \cdot sin}} \cdot \sqrt[3]{\frac{\sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(cos \cdot x\right) \cdot sin}}\right) \cdot \sqrt[3]{\frac{\sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(cos \cdot x\right) \cdot sin}}\right) \cdot \frac{\sqrt[3]{\cos \left(2 \cdot x\right)} \cdot \sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(cos \cdot x\right) \cdot sin}\]

Reproduce

herbie shell --seed 2019149 
(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))))