Average Error: 0.1 → 0.1
Time: 37.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 r660188 = x;
        double r660189 = y;
        double r660190 = z;
        double r660191 = r660189 * r660190;
        double r660192 = r660191 * r660190;
        double r660193 = r660188 + r660192;
        return r660193;
}

double f(double x, double y, double z) {
        double r660194 = x;
        double r660195 = z;
        double r660196 = y;
        double r660197 = r660195 * r660196;
        double r660198 = r660195 * r660197;
        double r660199 = r660194 + r660198;
        return r660199;
}

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