Average Error: 0.0 → 0.0
Time: 4.4s
Precision: 64
\[0.0 \le x \le 2\]
\[x \cdot \left(x \cdot x\right) + x \cdot x\]
\[x \cdot x + {x}^{3}\]
x \cdot \left(x \cdot x\right) + x \cdot x
x \cdot x + {x}^{3}
double f(double x) {
        double r152141 = x;
        double r152142 = r152141 * r152141;
        double r152143 = r152141 * r152142;
        double r152144 = r152143 + r152142;
        return r152144;
}

double f(double x) {
        double r152145 = x;
        double r152146 = r152145 * r152145;
        double r152147 = 3.0;
        double r152148 = pow(r152145, r152147);
        double r152149 = r152146 + r152148;
        return r152149;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.0
\[\left(\left(1 + x\right) \cdot x\right) \cdot x\]

Derivation

  1. Initial program 0.0

    \[x \cdot \left(x \cdot x\right) + x \cdot x\]
  2. Using strategy rm
  3. Applied *-un-lft-identity0.0

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

    \[\leadsto \color{blue}{1 \cdot \left(x \cdot \left(x \cdot x\right)\right)} + x \cdot x\]
  5. Simplified0.0

    \[\leadsto 1 \cdot \color{blue}{{x}^{3}} + x \cdot x\]
  6. Final simplification0.0

    \[\leadsto x \cdot x + {x}^{3}\]

Reproduce

herbie shell --seed 2019174 
(FPCore (x)
  :name "Expression 3, p15"
  :pre (<= 0.0 x 2.0)

  :herbie-target
  (* (* (+ 1.0 x) x) x)

  (+ (* x (* x x)) (* x x)))