Average Error: 0 → 0
Time: 27.1s
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 r4238158 = x;
        double r4238159 = r4238158 + r4238158;
        double r4238160 = r4238159 + r4238158;
        double r4238161 = r4238160 + r4238158;
        double r4238162 = r4238161 + r4238158;
        return r4238162;
}

double f(double x) {
        double r4238163 = 5.0;
        double r4238164 = x;
        double r4238165 = r4238163 * r4238164;
        return r4238165;
}

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