Average Error: 0.0 → 0.0
Time: 459.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 r28271 = x;
        double r28272 = y;
        double r28273 = r28271 + r28272;
        double r28274 = z;
        double r28275 = r28273 + r28274;
        return r28275;
}

double f(double x, double y, double z) {
        double r28276 = x;
        double r28277 = z;
        double r28278 = y;
        double r28279 = r28277 + r28278;
        double r28280 = r28276 + r28279;
        return r28280;
}

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