Average Error: 0.1 → 0.1
Time: 4.4s
Precision: 64
\[x + \left(y \cdot z\right) \cdot z\]
\[x + \left(y \cdot z\right) \cdot z\]
x + \left(y \cdot z\right) \cdot z
x + \left(y \cdot z\right) \cdot z
double f(double x, double y, double z) {
        double r22415 = x;
        double r22416 = y;
        double r22417 = z;
        double r22418 = r22416 * r22417;
        double r22419 = r22418 * r22417;
        double r22420 = r22415 + r22419;
        return r22420;
}

double f(double x, double y, double z) {
        double r22421 = x;
        double r22422 = y;
        double r22423 = z;
        double r22424 = r22422 * r22423;
        double r22425 = r22424 * r22423;
        double r22426 = r22421 + r22425;
        return r22426;
}

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 + \left(y \cdot z\right) \cdot z\]

Reproduce

herbie shell --seed 2020064 +o rules:numerics
(FPCore (x y z)
  :name "Statistics.Sample:robustSumVarWeighted from math-functions-0.1.5.2"
  :precision binary64
  (+ x (* (* y z) z)))