Average Error: 0.5 → 0.0
Time: 11.0s
Precision: 64
\[\cos \left(x + 1\right) \cdot 3 + x\]
\[\left(3 \cdot \sqrt[3]{\cos \left(x + 1\right)}\right) \cdot \left(\sqrt[3]{\cos \left(x + 1\right)} \cdot \sqrt[3]{\cos \left(x + 1\right)}\right) + x\]
\cos \left(x + 1\right) \cdot 3 + x
\left(3 \cdot \sqrt[3]{\cos \left(x + 1\right)}\right) \cdot \left(\sqrt[3]{\cos \left(x + 1\right)} \cdot \sqrt[3]{\cos \left(x + 1\right)}\right) + x
double f(double x) {
        double r333257 = x;
        double r333258 = 1.0;
        double r333259 = r333257 + r333258;
        double r333260 = cos(r333259);
        double r333261 = 3.0;
        double r333262 = r333260 * r333261;
        double r333263 = r333262 + r333257;
        return r333263;
}

double f(double x) {
        double r333264 = 3.0;
        double r333265 = x;
        double r333266 = 1.0;
        double r333267 = r333265 + r333266;
        double r333268 = cos(r333267);
        double r333269 = cbrt(r333268);
        double r333270 = r333264 * r333269;
        double r333271 = r333269 * r333269;
        double r333272 = r333270 * r333271;
        double r333273 = r333272 + r333265;
        return r333273;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.5

    \[\cos \left(x + 1\right) \cdot 3 + x\]
  2. Using strategy rm
  3. Applied add-cube-cbrt0.5

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

    \[\leadsto \color{blue}{\left(\sqrt[3]{\cos \left(x + 1\right)} \cdot \sqrt[3]{\cos \left(x + 1\right)}\right) \cdot \left(\sqrt[3]{\cos \left(x + 1\right)} \cdot 3\right)} + x\]
  5. Final simplification0.0

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

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "cos(x+1)*3+x"
  (+ (* (cos (+ x 1)) 3) x))