Average Error: 0.1 → 0.1
Time: 20.3s
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 r744816 = x;
        double r744817 = y;
        double r744818 = z;
        double r744819 = r744817 * r744818;
        double r744820 = r744819 * r744818;
        double r744821 = r744816 + r744820;
        return r744821;
}

double f(double x, double y, double z) {
        double r744822 = x;
        double r744823 = z;
        double r744824 = y;
        double r744825 = r744823 * r744824;
        double r744826 = r744823 * r744825;
        double r744827 = r744822 + r744826;
        return r744827;
}

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