Average Error: 0 → 0
Time: 3.8s
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 r2033045 = x;
        double r2033046 = r2033045 + r2033045;
        double r2033047 = r2033046 + r2033045;
        double r2033048 = r2033047 + r2033045;
        double r2033049 = r2033048 + r2033045;
        return r2033049;
}

double f(double x) {
        double r2033050 = 5.0;
        double r2033051 = x;
        double r2033052 = r2033050 * r2033051;
        return r2033052;
}

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