Average Error: 0.0 → 0.0
Time: 535.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 r47483 = x;
        double r47484 = y;
        double r47485 = r47483 + r47484;
        double r47486 = z;
        double r47487 = r47485 + r47486;
        return r47487;
}

double f(double x, double y, double z) {
        double r47488 = x;
        double r47489 = z;
        double r47490 = y;
        double r47491 = r47489 + r47490;
        double r47492 = r47488 + r47491;
        return r47492;
}

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