Average Error: 0 → 0
Time: 888.0ms
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 r4765092 = x;
        double r4765093 = r4765092 + r4765092;
        double r4765094 = r4765093 + r4765092;
        double r4765095 = r4765094 + r4765092;
        double r4765096 = r4765095 + r4765092;
        return r4765096;
}

double f(double x) {
        double r4765097 = 5.0;
        double r4765098 = x;
        double r4765099 = r4765097 * r4765098;
        return r4765099;
}

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 2019165 
(FPCore (x)
  :name "Main:i from "
  (+ (+ (+ (+ x x) x) x) x))