Average Error: 0 → 0
Time: 8.6s
Precision: 64
\[\left(\left(\left(x + x\right) + x\right) + x\right) + x\]
\[5 \cdot x\]
\left(\left(\left(x + x\right) + x\right) + x\right) + x
5 \cdot x
double f(double x) {
        double r6158711 = x;
        double r6158712 = r6158711 + r6158711;
        double r6158713 = r6158712 + r6158711;
        double r6158714 = r6158713 + r6158711;
        double r6158715 = r6158714 + r6158711;
        return r6158715;
}

double f(double x) {
        double r6158716 = 5.0;
        double r6158717 = x;
        double r6158718 = r6158716 * r6158717;
        return r6158718;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0

    \[\left(\left(\left(x + x\right) + x\right) + x\right) + x\]
  2. Simplified0

    \[\leadsto \color{blue}{5 \cdot x}\]
  3. Final simplification0

    \[\leadsto 5 \cdot x\]

Reproduce

herbie shell --seed 2019163 +o rules:numerics
(FPCore (x)
  :name "Main:i from "
  (+ (+ (+ (+ x x) x) x) x))