Average Error: 0.0 → 0.0
Time: 21.7s
Precision: 64
\[0 \le x \le 2\]
\[x \cdot \left(x \cdot x\right) + x \cdot x\]
\[\frac{x \cdot x + x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}{x \cdot x + \left(1 - x\right)}\]
x \cdot \left(x \cdot x\right) + x \cdot x
\frac{x \cdot x + x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}{x \cdot x + \left(1 - x\right)}
double f(double x) {
        double r26469951 = x;
        double r26469952 = r26469951 * r26469951;
        double r26469953 = r26469951 * r26469952;
        double r26469954 = r26469953 + r26469952;
        return r26469954;
}

double f(double x) {
        double r26469955 = x;
        double r26469956 = r26469955 * r26469955;
        double r26469957 = r26469956 * r26469956;
        double r26469958 = r26469955 * r26469957;
        double r26469959 = r26469956 + r26469958;
        double r26469960 = 1.0;
        double r26469961 = r26469960 - r26469955;
        double r26469962 = r26469956 + r26469961;
        double r26469963 = r26469959 / r26469962;
        return r26469963;
}

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 distribute-lft1-in0.0

    \[\leadsto \color{blue}{\left(x + 1\right) \cdot \left(x \cdot x\right)}\]
  4. Using strategy rm
  5. Applied flip3-+0.0

    \[\leadsto \color{blue}{\frac{{x}^{3} + {1}^{3}}{x \cdot x + \left(1 \cdot 1 - x \cdot 1\right)}} \cdot \left(x \cdot x\right)\]
  6. Applied associate-*l/0.0

    \[\leadsto \color{blue}{\frac{\left({x}^{3} + {1}^{3}\right) \cdot \left(x \cdot x\right)}{x \cdot x + \left(1 \cdot 1 - x \cdot 1\right)}}\]
  7. Simplified0.0

    \[\leadsto \frac{\color{blue}{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) + x \cdot x}}{x \cdot x + \left(1 \cdot 1 - x \cdot 1\right)}\]
  8. Final simplification0.0

    \[\leadsto \frac{x \cdot x + x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}{x \cdot x + \left(1 - x\right)}\]

Reproduce

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

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

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