Average Error: 0 → 0
Time: 27.4s
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 r4299640 = x;
        double r4299641 = r4299640 + r4299640;
        double r4299642 = r4299641 + r4299640;
        double r4299643 = r4299642 + r4299640;
        double r4299644 = r4299643 + r4299640;
        return r4299644;
}

double f(double x) {
        double r4299645 = 5.0;
        double r4299646 = x;
        double r4299647 = r4299645 * r4299646;
        return r4299647;
}

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 2019162 
(FPCore (x)
  :name "Main:i from "
  (+ (+ (+ (+ x x) x) x) x))