Average Error: 0.1 → 0.1
Time: 14.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 r594891 = x;
        double r594892 = y;
        double r594893 = z;
        double r594894 = r594892 * r594893;
        double r594895 = r594894 * r594893;
        double r594896 = r594891 + r594895;
        return r594896;
}

double f(double x, double y, double z) {
        double r594897 = x;
        double r594898 = z;
        double r594899 = y;
        double r594900 = r594898 * r594899;
        double r594901 = r594898 * r594900;
        double r594902 = r594897 + r594901;
        return r594902;
}

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