Average Error: 0 → 0
Time: 753.0ms
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 r96185 = x;
        double r96186 = r96185 + r96185;
        double r96187 = r96186 + r96185;
        double r96188 = r96187 + r96185;
        double r96189 = r96188 + r96185;
        return r96189;
}

double f(double x) {
        double r96190 = 5.0;
        double r96191 = x;
        double r96192 = r96190 * r96191;
        return r96192;
}

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