Average Error: 0.0 → 0.0
Time: 4.3s
Precision: 64
\[\left(x + y\right) \cdot \left(z + 1\right)\]
\[z \cdot \left(x + y\right) + \left(x + y\right) \cdot 1\]
\left(x + y\right) \cdot \left(z + 1\right)
z \cdot \left(x + y\right) + \left(x + y\right) \cdot 1
double f(double x, double y, double z) {
        double r49942 = x;
        double r49943 = y;
        double r49944 = r49942 + r49943;
        double r49945 = z;
        double r49946 = 1.0;
        double r49947 = r49945 + r49946;
        double r49948 = r49944 * r49947;
        return r49948;
}

double f(double x, double y, double z) {
        double r49949 = z;
        double r49950 = x;
        double r49951 = y;
        double r49952 = r49950 + r49951;
        double r49953 = r49949 * r49952;
        double r49954 = 1.0;
        double r49955 = r49952 * r49954;
        double r49956 = r49953 + r49955;
        return r49956;
}

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. Final simplification0.0

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

Reproduce

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