Average Error: 0.1 → 0.1
Time: 9.4s
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 r22591 = x;
        double r22592 = y;
        double r22593 = z;
        double r22594 = r22592 * r22593;
        double r22595 = r22594 * r22593;
        double r22596 = r22591 + r22595;
        return r22596;
}

double f(double x, double y, double z) {
        double r22597 = x;
        double r22598 = z;
        double r22599 = y;
        double r22600 = r22598 * r22599;
        double r22601 = r22598 * r22600;
        double r22602 = r22597 + r22601;
        return r22602;
}

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