Average Error: 0.1 → 0.1
Time: 38.7s
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 r706547 = x;
        double r706548 = y;
        double r706549 = z;
        double r706550 = r706548 * r706549;
        double r706551 = r706550 * r706549;
        double r706552 = r706547 + r706551;
        return r706552;
}

double f(double x, double y, double z) {
        double r706553 = x;
        double r706554 = z;
        double r706555 = y;
        double r706556 = r706554 * r706555;
        double r706557 = r706554 * r706556;
        double r706558 = r706553 + r706557;
        return r706558;
}

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