Average Error: 0 → 0
Time: 337.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 r163345 = x;
        double r163346 = r163345 + r163345;
        double r163347 = r163346 + r163345;
        double r163348 = r163347 + r163345;
        double r163349 = r163348 + r163345;
        return r163349;
}

double f(double x) {
        double r163350 = x;
        double r163351 = 5.0;
        double r163352 = r163350 * r163351;
        return r163352;
}

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