Average Error: 0.1 → 0.1
Time: 16.7s
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 r724275 = x;
        double r724276 = y;
        double r724277 = z;
        double r724278 = r724276 * r724277;
        double r724279 = r724278 * r724277;
        double r724280 = r724275 + r724279;
        return r724280;
}

double f(double x, double y, double z) {
        double r724281 = x;
        double r724282 = z;
        double r724283 = y;
        double r724284 = r724282 * r724283;
        double r724285 = r724282 * r724284;
        double r724286 = r724281 + r724285;
        return r724286;
}

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