Average Error: 0.1 → 0.1
Time: 18.2s
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 r693416 = x;
        double r693417 = y;
        double r693418 = z;
        double r693419 = r693417 * r693418;
        double r693420 = r693419 * r693418;
        double r693421 = r693416 + r693420;
        return r693421;
}

double f(double x, double y, double z) {
        double r693422 = x;
        double r693423 = z;
        double r693424 = y;
        double r693425 = r693423 * r693424;
        double r693426 = r693423 * r693425;
        double r693427 = r693422 + r693426;
        return r693427;
}

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 2019170 +o rules:numerics
(FPCore (x y z)
  :name "Statistics.Sample:robustSumVarWeighted from math-functions-0.1.5.2"
  (+ x (* (* y z) z)))