Average Error: 0 → 0
Time: 675.0ms
Precision: 64
\[\left(\left(\left(x + x\right) + x\right) + x\right) + x\]
\[x \cdot 5\]
\left(\left(\left(x + x\right) + x\right) + x\right) + x
x \cdot 5
double f(double x) {
        double r67842 = x;
        double r67843 = r67842 + r67842;
        double r67844 = r67843 + r67842;
        double r67845 = r67844 + r67842;
        double r67846 = r67845 + r67842;
        return r67846;
}

double f(double x) {
        double r67847 = x;
        double r67848 = 5.0;
        double r67849 = r67847 * r67848;
        return r67849;
}

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}{x \cdot 5}\]
  3. Final simplification0

    \[\leadsto x \cdot 5\]

Reproduce

herbie shell --seed 2019303 +o rules:numerics
(FPCore (x)
  :name "Main:i from "
  :precision binary64
  (+ (+ (+ (+ x x) x) x) x))