Average Error: 0 → 0
Time: 10.0s
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 r5408684 = x;
        double r5408685 = r5408684 + r5408684;
        double r5408686 = r5408685 + r5408684;
        double r5408687 = r5408686 + r5408684;
        double r5408688 = r5408687 + r5408684;
        return r5408688;
}

double f(double x) {
        double r5408689 = 5.0;
        double r5408690 = x;
        double r5408691 = r5408689 * r5408690;
        return r5408691;
}

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