Average Error: 0.1 → 0.1
Time: 10.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 r855188 = x;
        double r855189 = y;
        double r855190 = z;
        double r855191 = r855189 * r855190;
        double r855192 = r855191 * r855190;
        double r855193 = r855188 + r855192;
        return r855193;
}

double f(double x, double y, double z) {
        double r855194 = x;
        double r855195 = z;
        double r855196 = y;
        double r855197 = r855195 * r855196;
        double r855198 = r855195 * r855197;
        double r855199 = r855194 + r855198;
        return r855199;
}

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