Average Error: 0.1 → 0.1
Time: 9.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 r259939 = x;
        double r259940 = y;
        double r259941 = z;
        double r259942 = r259940 * r259941;
        double r259943 = r259942 * r259941;
        double r259944 = r259939 + r259943;
        return r259944;
}

double f(double x, double y, double z) {
        double r259945 = x;
        double r259946 = z;
        double r259947 = y;
        double r259948 = r259946 * r259947;
        double r259949 = r259946 * r259948;
        double r259950 = r259945 + r259949;
        return r259950;
}

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