Average Error: 0.0 → 0.0
Time: 14.9s
Precision: 64
\[0.0 \le x \le 2\]
\[x \cdot \left(x \cdot x\right) + x \cdot x\]
\[\left(\sqrt{x} \cdot x\right) \cdot \left(\sqrt{x} \cdot x\right) + x \cdot x\]
x \cdot \left(x \cdot x\right) + x \cdot x
\left(\sqrt{x} \cdot x\right) \cdot \left(\sqrt{x} \cdot x\right) + x \cdot x
double f(double x) {
        double r83698 = x;
        double r83699 = r83698 * r83698;
        double r83700 = r83698 * r83699;
        double r83701 = r83700 + r83699;
        return r83701;
}

double f(double x) {
        double r83702 = x;
        double r83703 = sqrt(r83702);
        double r83704 = r83703 * r83702;
        double r83705 = r83704 * r83704;
        double r83706 = r83702 * r83702;
        double r83707 = r83705 + r83706;
        return r83707;
}

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-sqr-sqrt0.0

    \[\leadsto \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot \left(x \cdot x\right) + x \cdot x\]
  4. Applied unswap-sqr0.0

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

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

Reproduce

herbie shell --seed 2019325 
(FPCore (x)
  :name "Expression 3, p15"
  :precision binary64
  :pre (<= 0.0 x 2)

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

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