Average Error: 0.0 → 0.0
Time: 809.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 r24689 = x;
        double r24690 = y;
        double r24691 = r24689 + r24690;
        double r24692 = z;
        double r24693 = 1.0;
        double r24694 = r24692 + r24693;
        double r24695 = r24691 * r24694;
        return r24695;
}

double f(double x, double y, double z) {
        double r24696 = z;
        double r24697 = x;
        double r24698 = y;
        double r24699 = r24697 + r24698;
        double r24700 = r24696 * r24699;
        double r24701 = 1.0;
        double r24702 = r24701 * r24699;
        double r24703 = r24700 + r24702;
        return r24703;
}

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