Average Error: 0.1 → 0.1
Time: 3.7s
Precision: 64
\[x + \left(y \cdot z\right) \cdot z\]
\[x + \left(y \cdot z\right) \cdot z\]
x + \left(y \cdot z\right) \cdot z
x + \left(y \cdot z\right) \cdot z
double f(double x, double y, double z) {
        double r16578 = x;
        double r16579 = y;
        double r16580 = z;
        double r16581 = r16579 * r16580;
        double r16582 = r16581 * r16580;
        double r16583 = r16578 + r16582;
        return r16583;
}

double f(double x, double y, double z) {
        double r16584 = x;
        double r16585 = y;
        double r16586 = z;
        double r16587 = r16585 * r16586;
        double r16588 = r16587 * r16586;
        double r16589 = r16584 + r16588;
        return r16589;
}

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 + \left(y \cdot z\right) \cdot z\]

Reproduce

herbie shell --seed 2020034 +o rules:numerics
(FPCore (x y z)
  :name "Statistics.Sample:robustSumVarWeighted from math-functions-0.1.5.2"
  :precision binary64
  (+ x (* (* y z) z)))