Average Error: 0.1 → 0.1
Time: 12.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 r13359 = x;
        double r13360 = y;
        double r13361 = z;
        double r13362 = r13360 * r13361;
        double r13363 = r13362 * r13361;
        double r13364 = r13359 + r13363;
        return r13364;
}

double f(double x, double y, double z) {
        double r13365 = x;
        double r13366 = z;
        double r13367 = y;
        double r13368 = r13366 * r13367;
        double r13369 = r13366 * r13368;
        double r13370 = r13365 + r13369;
        return r13370;
}

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