Average Error: 0.0 → 0.0
Time: 38.4s
Precision: 64
\[0.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 r5241538 = x;
        double r5241539 = r5241538 * r5241538;
        double r5241540 = r5241538 * r5241539;
        double r5241541 = r5241540 + r5241539;
        return r5241541;
}

double f(double x) {
        double r5241542 = x;
        double r5241543 = r5241542 * r5241542;
        double r5241544 = r5241542 * r5241543;
        double r5241545 = log(r5241544);
        double r5241546 = exp(r5241545);
        double r5241547 = r5241543 + r5241546;
        return r5241547;
}

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 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.0 x 2.0)

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

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