Average Error: 0.0 → 0.0
Time: 6.7s
Precision: 64
\[0.0 \le x \le 2\]
\[x \cdot \left(x \cdot x\right) + x \cdot x\]
\[x \cdot x + e^{3 \cdot \log x}\]
x \cdot \left(x \cdot x\right) + x \cdot x
x \cdot x + e^{3 \cdot \log x}
double f(double x) {
        double r4458167 = x;
        double r4458168 = r4458167 * r4458167;
        double r4458169 = r4458167 * r4458168;
        double r4458170 = r4458169 + r4458168;
        return r4458170;
}

double f(double x) {
        double r4458171 = x;
        double r4458172 = r4458171 * r4458171;
        double r4458173 = 3.0;
        double r4458174 = log(r4458171);
        double r4458175 = r4458173 * r4458174;
        double r4458176 = exp(r4458175);
        double r4458177 = r4458172 + r4458176;
        return r4458177;
}

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 x \cdot \left(x \cdot \color{blue}{e^{\log x}}\right) + x \cdot x\]
  4. Applied add-exp-log0.0

    \[\leadsto x \cdot \left(\color{blue}{e^{\log x}} \cdot e^{\log x}\right) + x \cdot x\]
  5. Applied prod-exp0.0

    \[\leadsto x \cdot \color{blue}{e^{\log x + \log x}} + x \cdot x\]
  6. Applied add-exp-log0.0

    \[\leadsto \color{blue}{e^{\log x}} \cdot e^{\log x + \log x} + x \cdot x\]
  7. Applied prod-exp0.0

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

    \[\leadsto e^{\color{blue}{3 \cdot \log x}} + x \cdot x\]
  9. Final simplification0.0

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

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)))