Average Error: 0.0 → 0.0
Time: 881.0ms
Precision: 64
\[\left(x + y\right) \cdot \left(z + 1\right)\]
\[z \cdot \left(x + y\right) + 1 \cdot \left(x + y\right)\]
\left(x + y\right) \cdot \left(z + 1\right)
z \cdot \left(x + y\right) + 1 \cdot \left(x + y\right)
double f(double x, double y, double z) {
        double r27177 = x;
        double r27178 = y;
        double r27179 = r27177 + r27178;
        double r27180 = z;
        double r27181 = 1.0;
        double r27182 = r27180 + r27181;
        double r27183 = r27179 * r27182;
        return r27183;
}

double f(double x, double y, double z) {
        double r27184 = z;
        double r27185 = x;
        double r27186 = y;
        double r27187 = r27185 + r27186;
        double r27188 = r27184 * r27187;
        double r27189 = 1.0;
        double r27190 = r27189 * r27187;
        double r27191 = r27188 + r27190;
        return r27191;
}

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) \cdot \left(z + 1\right)\]
  2. Using strategy rm
  3. Applied distribute-lft-in0.0

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

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

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

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

Reproduce

herbie shell --seed 2020064 
(FPCore (x y z)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, G"
  :precision binary64
  (* (+ x y) (+ z 1)))