Average Error: 0 → 0
Time: 9.9s
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 r5390739 = x;
        double r5390740 = r5390739 + r5390739;
        double r5390741 = r5390740 + r5390739;
        double r5390742 = r5390741 + r5390739;
        double r5390743 = r5390742 + r5390739;
        return r5390743;
}

double f(double x) {
        double r5390744 = 5.0;
        double r5390745 = x;
        double r5390746 = r5390744 * r5390745;
        return r5390746;
}

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