Average Error: 0.1 → 0.1
Time: 19.5s
Precision: 64
\[x + \left(y \cdot z\right) \cdot z\]
\[x + z \cdot \left(z \cdot y\right)\]
x + \left(y \cdot z\right) \cdot z
x + z \cdot \left(z \cdot y\right)
double f(double x, double y, double z) {
        double r791165 = x;
        double r791166 = y;
        double r791167 = z;
        double r791168 = r791166 * r791167;
        double r791169 = r791168 * r791167;
        double r791170 = r791165 + r791169;
        return r791170;
}

double f(double x, double y, double z) {
        double r791171 = x;
        double r791172 = z;
        double r791173 = y;
        double r791174 = r791172 * r791173;
        double r791175 = r791172 * r791174;
        double r791176 = r791171 + r791175;
        return r791176;
}

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.1

    \[x + \left(y \cdot z\right) \cdot z\]
  2. Final simplification0.1

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

Reproduce

herbie shell --seed 2019163 +o rules:numerics
(FPCore (x y z)
  :name "Statistics.Sample:robustSumVarWeighted from math-functions-0.1.5.2"
  (+ x (* (* y z) z)))