Average Error: 0 → 0
Time: 2.2s
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 r2238099 = x;
        double r2238100 = r2238099 + r2238099;
        double r2238101 = r2238100 + r2238099;
        double r2238102 = r2238101 + r2238099;
        double r2238103 = r2238102 + r2238099;
        return r2238103;
}

double f(double x) {
        double r2238104 = 5.0;
        double r2238105 = x;
        double r2238106 = r2238104 * r2238105;
        return r2238106;
}

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