Average Error: 0.1 → 0.1
Time: 16.8s
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 r572044 = x;
        double r572045 = y;
        double r572046 = z;
        double r572047 = r572045 * r572046;
        double r572048 = r572047 * r572046;
        double r572049 = r572044 + r572048;
        return r572049;
}

double f(double x, double y, double z) {
        double r572050 = x;
        double r572051 = z;
        double r572052 = y;
        double r572053 = r572051 * r572052;
        double r572054 = r572051 * r572053;
        double r572055 = r572050 + r572054;
        return r572055;
}

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