Average Error: 0.1 → 0.1
Time: 19.0s
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 r791168 = x;
        double r791169 = y;
        double r791170 = z;
        double r791171 = r791169 * r791170;
        double r791172 = r791171 * r791170;
        double r791173 = r791168 + r791172;
        return r791173;
}

double f(double x, double y, double z) {
        double r791174 = x;
        double r791175 = z;
        double r791176 = y;
        double r791177 = r791175 * r791176;
        double r791178 = r791175 * r791177;
        double r791179 = r791174 + r791178;
        return r791179;
}

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)))