Average Error: 0.1 → 0.1
Time: 16.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 r1026666 = x;
        double r1026667 = y;
        double r1026668 = z;
        double r1026669 = r1026667 * r1026668;
        double r1026670 = r1026669 * r1026668;
        double r1026671 = r1026666 + r1026670;
        return r1026671;
}

double f(double x, double y, double z) {
        double r1026672 = x;
        double r1026673 = z;
        double r1026674 = y;
        double r1026675 = r1026673 * r1026674;
        double r1026676 = r1026673 * r1026675;
        double r1026677 = r1026672 + r1026676;
        return r1026677;
}

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