Average Error: 0.1 → 0.1
Time: 11.4s
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 r889973 = x;
        double r889974 = y;
        double r889975 = z;
        double r889976 = r889974 * r889975;
        double r889977 = r889976 * r889975;
        double r889978 = r889973 + r889977;
        return r889978;
}

double f(double x, double y, double z) {
        double r889979 = x;
        double r889980 = z;
        double r889981 = y;
        double r889982 = r889980 * r889981;
        double r889983 = r889980 * r889982;
        double r889984 = r889979 + r889983;
        return r889984;
}

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