Average Error: 0.0 → 0.0
Time: 553.0ms
Precision: 64
\[\left(x + y\right) + z\]
\[x + \left(z + y\right)\]
\left(x + y\right) + z
x + \left(z + y\right)
double f(double x, double y, double z) {
        double r13181 = x;
        double r13182 = y;
        double r13183 = r13181 + r13182;
        double r13184 = z;
        double r13185 = r13183 + r13184;
        return r13185;
}

double f(double x, double y, double z) {
        double r13186 = x;
        double r13187 = z;
        double r13188 = y;
        double r13189 = r13187 + r13188;
        double r13190 = r13186 + r13189;
        return r13190;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\left(x + y\right) + z\]
  2. Using strategy rm
  3. Applied *-un-lft-identity0.0

    \[\leadsto \left(x + y\right) + \color{blue}{1 \cdot z}\]
  4. Applied *-un-lft-identity0.0

    \[\leadsto \color{blue}{1 \cdot \left(x + y\right)} + 1 \cdot z\]
  5. Applied distribute-lft-out0.0

    \[\leadsto \color{blue}{1 \cdot \left(\left(x + y\right) + z\right)}\]
  6. Simplified0.0

    \[\leadsto 1 \cdot \color{blue}{\left(x + \left(z + y\right)\right)}\]
  7. Final simplification0.0

    \[\leadsto x + \left(z + y\right)\]

Reproduce

herbie shell --seed 2019353 +o rules:numerics
(FPCore (x y z)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, I"
  :precision binary64
  (+ (+ x y) z))