Average Error: 0 → 0
Time: 10.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 r4081076 = x;
        double r4081077 = r4081076 + r4081076;
        double r4081078 = r4081077 + r4081076;
        double r4081079 = r4081078 + r4081076;
        double r4081080 = r4081079 + r4081076;
        return r4081080;
}

double f(double x) {
        double r4081081 = 5.0;
        double r4081082 = x;
        double r4081083 = r4081081 * r4081082;
        return r4081083;
}

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 2019172 +o rules:numerics
(FPCore (x)
  :name "Main:i from "
  (+ (+ (+ (+ x x) x) x) x))