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

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

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