Average Error: 0.0 → 0.0
Time: 543.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 r20092 = x;
        double r20093 = y;
        double r20094 = r20092 + r20093;
        double r20095 = z;
        double r20096 = r20094 + r20095;
        return r20096;
}

double f(double x, double y, double z) {
        double r20097 = x;
        double r20098 = z;
        double r20099 = y;
        double r20100 = r20098 + r20099;
        double r20101 = r20097 + r20100;
        return r20101;
}

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