Average Error: 0.0 → 0.0
Time: 14.9s
Precision: 64
\[0 \le x \le 2\]
\[x \cdot \left(x \cdot x\right) + x \cdot x\]
\[x \cdot x + e^{\log \left(x \cdot \left(x \cdot x\right)\right)}\]
x \cdot \left(x \cdot x\right) + x \cdot x
x \cdot x + e^{\log \left(x \cdot \left(x \cdot x\right)\right)}
double f(double x) {
        double r4241317 = x;
        double r4241318 = r4241317 * r4241317;
        double r4241319 = r4241317 * r4241318;
        double r4241320 = r4241319 + r4241318;
        return r4241320;
}

double f(double x) {
        double r4241321 = x;
        double r4241322 = r4241321 * r4241321;
        double r4241323 = r4241321 * r4241322;
        double r4241324 = log(r4241323);
        double r4241325 = exp(r4241324);
        double r4241326 = r4241322 + r4241325;
        return r4241326;
}

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.0 + 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 add-exp-log0.0

    \[\leadsto \color{blue}{e^{\log \left(x \cdot \left(x \cdot x\right)\right)}} + x \cdot x\]
  4. Final simplification0.0

    \[\leadsto x \cdot x + e^{\log \left(x \cdot \left(x \cdot x\right)\right)}\]

Reproduce

herbie shell --seed 2019168 
(FPCore (x)
  :name "Expression 3, p15"
  :pre (<= 0 x 2)

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

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