Average Error: 0.1 → 0.1
Time: 16.8s
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 r767447 = x;
        double r767448 = y;
        double r767449 = z;
        double r767450 = r767448 * r767449;
        double r767451 = r767450 * r767449;
        double r767452 = r767447 + r767451;
        return r767452;
}

double f(double x, double y, double z) {
        double r767453 = x;
        double r767454 = z;
        double r767455 = y;
        double r767456 = r767454 * r767455;
        double r767457 = r767454 * r767456;
        double r767458 = r767453 + r767457;
        return r767458;
}

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