Average Error: 0 → 0
Time: 740.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 r3946510 = x;
        double r3946511 = r3946510 + r3946510;
        double r3946512 = r3946511 + r3946510;
        double r3946513 = r3946512 + r3946510;
        double r3946514 = r3946513 + r3946510;
        return r3946514;
}

double f(double x) {
        double r3946515 = 5.0;
        double r3946516 = x;
        double r3946517 = r3946515 * r3946516;
        return r3946517;
}

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