Average Error: 26.5 → 0.4
Time: 15.0s
Precision: 64
\[\sin \left(1 + 2 \cdot x\right)\]
\[\left(\sqrt[3]{\cos 1} \cdot \sin \left(2 \cdot x\right)\right) \cdot \left(\sqrt[3]{\cos 1} \cdot \sqrt[3]{\cos 1}\right) + \sin 1 \cdot \cos \left(2 \cdot x\right)\]
\sin \left(1 + 2 \cdot x\right)
\left(\sqrt[3]{\cos 1} \cdot \sin \left(2 \cdot x\right)\right) \cdot \left(\sqrt[3]{\cos 1} \cdot \sqrt[3]{\cos 1}\right) + \sin 1 \cdot \cos \left(2 \cdot x\right)
double f(double x) {
        double r14449700 = 1.0;
        double r14449701 = 2.0;
        double r14449702 = x;
        double r14449703 = r14449701 * r14449702;
        double r14449704 = r14449700 + r14449703;
        double r14449705 = sin(r14449704);
        return r14449705;
}

double f(double x) {
        double r14449706 = 1.0;
        double r14449707 = cos(r14449706);
        double r14449708 = cbrt(r14449707);
        double r14449709 = 2.0;
        double r14449710 = x;
        double r14449711 = r14449709 * r14449710;
        double r14449712 = sin(r14449711);
        double r14449713 = r14449708 * r14449712;
        double r14449714 = r14449708 * r14449708;
        double r14449715 = r14449713 * r14449714;
        double r14449716 = sin(r14449706);
        double r14449717 = cos(r14449711);
        double r14449718 = r14449716 * r14449717;
        double r14449719 = r14449715 + r14449718;
        return r14449719;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 26.5

    \[\sin \left(1 + 2 \cdot x\right)\]
  2. Using strategy rm
  3. Applied sin-sum0.4

    \[\leadsto \color{blue}{\sin 1 \cdot \cos \left(2 \cdot x\right) + \cos 1 \cdot \sin \left(2 \cdot x\right)}\]
  4. Using strategy rm
  5. Applied add-cube-cbrt0.4

    \[\leadsto \sin 1 \cdot \cos \left(2 \cdot x\right) + \color{blue}{\left(\left(\sqrt[3]{\cos 1} \cdot \sqrt[3]{\cos 1}\right) \cdot \sqrt[3]{\cos 1}\right)} \cdot \sin \left(2 \cdot x\right)\]
  6. Applied associate-*l*0.4

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

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

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "sin(1 + 2x)"
  (sin (+ 1 (* 2 x))))