Average Error: 0.1 → 0.1
Time: 17.3s
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 r761710 = x;
        double r761711 = y;
        double r761712 = z;
        double r761713 = r761711 * r761712;
        double r761714 = r761713 * r761712;
        double r761715 = r761710 + r761714;
        return r761715;
}

double f(double x, double y, double z) {
        double r761716 = x;
        double r761717 = z;
        double r761718 = y;
        double r761719 = r761717 * r761718;
        double r761720 = r761717 * r761719;
        double r761721 = r761716 + r761720;
        return r761721;
}

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