Average Error: 0.1 → 0.1
Time: 9.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 r23237 = x;
        double r23238 = y;
        double r23239 = z;
        double r23240 = r23238 * r23239;
        double r23241 = r23240 * r23239;
        double r23242 = r23237 + r23241;
        return r23242;
}

double f(double x, double y, double z) {
        double r23243 = x;
        double r23244 = z;
        double r23245 = y;
        double r23246 = r23244 * r23245;
        double r23247 = r23244 * r23246;
        double r23248 = r23243 + r23247;
        return r23248;
}

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