Average Error: 0.0 → 0.0
Time: 770.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 r38970 = x;
        double r38971 = y;
        double r38972 = r38970 + r38971;
        double r38973 = z;
        double r38974 = 1.0;
        double r38975 = r38973 + r38974;
        double r38976 = r38972 * r38975;
        return r38976;
}

double f(double x, double y, double z) {
        double r38977 = z;
        double r38978 = x;
        double r38979 = y;
        double r38980 = r38978 + r38979;
        double r38981 = r38977 * r38980;
        double r38982 = 1.0;
        double r38983 = r38982 * r38980;
        double r38984 = r38981 + r38983;
        return r38984;
}

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