Average Error: 0 → 0
Time: 669.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 r62890 = x;
        double r62891 = r62890 + r62890;
        double r62892 = r62891 + r62890;
        double r62893 = r62892 + r62890;
        double r62894 = r62893 + r62890;
        return r62894;
}

double f(double x) {
        double r62895 = x;
        double r62896 = 5.0;
        double r62897 = r62895 * r62896;
        return r62897;
}

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