Average Error: 0.1 → 0.1
Time: 17.2s
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 r617940 = x;
        double r617941 = y;
        double r617942 = z;
        double r617943 = r617941 * r617942;
        double r617944 = r617943 * r617942;
        double r617945 = r617940 + r617944;
        return r617945;
}

double f(double x, double y, double z) {
        double r617946 = x;
        double r617947 = z;
        double r617948 = y;
        double r617949 = r617947 * r617948;
        double r617950 = r617947 * r617949;
        double r617951 = r617946 + r617950;
        return r617951;
}

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