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 r22340 = x;
        double r22341 = y;
        double r22342 = z;
        double r22343 = r22341 * r22342;
        double r22344 = r22343 * r22342;
        double r22345 = r22340 + r22344;
        return r22345;
}

double f(double x, double y, double z) {
        double r22346 = x;
        double r22347 = z;
        double r22348 = y;
        double r22349 = r22347 * r22348;
        double r22350 = r22347 * r22349;
        double r22351 = r22346 + r22350;
        return r22351;
}

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