Average Error: 0 → 0
Time: 9.3s
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 r4283953 = x;
        double r4283954 = r4283953 + r4283953;
        double r4283955 = r4283954 + r4283953;
        double r4283956 = r4283955 + r4283953;
        double r4283957 = r4283956 + r4283953;
        return r4283957;
}

double f(double x) {
        double r4283958 = 5.0;
        double r4283959 = x;
        double r4283960 = r4283958 * r4283959;
        return r4283960;
}

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