Average Error: 0.1 → 0.1
Time: 11.6s
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 r889749 = x;
        double r889750 = y;
        double r889751 = z;
        double r889752 = r889750 * r889751;
        double r889753 = r889752 * r889751;
        double r889754 = r889749 + r889753;
        return r889754;
}

double f(double x, double y, double z) {
        double r889755 = x;
        double r889756 = z;
        double r889757 = y;
        double r889758 = r889756 * r889757;
        double r889759 = r889756 * r889758;
        double r889760 = r889755 + r889759;
        return r889760;
}

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