Average Error: 0.0 → 0.0
Time: 540.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 r29495 = x;
        double r29496 = y;
        double r29497 = r29495 + r29496;
        double r29498 = z;
        double r29499 = r29497 + r29498;
        return r29499;
}

double f(double x, double y, double z) {
        double r29500 = x;
        double r29501 = z;
        double r29502 = y;
        double r29503 = r29501 + r29502;
        double r29504 = r29500 + r29503;
        return r29504;
}

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 2020003 
(FPCore (x y z)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, I"
  :precision binary64
  (+ (+ x y) z))