Average Error: 0.1 → 0.1
Time: 12.1s
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 r17338 = x;
        double r17339 = y;
        double r17340 = z;
        double r17341 = r17339 * r17340;
        double r17342 = r17341 * r17340;
        double r17343 = r17338 + r17342;
        return r17343;
}

double f(double x, double y, double z) {
        double r17344 = x;
        double r17345 = z;
        double r17346 = y;
        double r17347 = r17345 * r17346;
        double r17348 = r17345 * r17347;
        double r17349 = r17344 + r17348;
        return r17349;
}

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