Average Error: 0.0 → 0.0
Time: 18.4s
Precision: 64
\[x + y \cdot \left(z + x\right)\]
\[\left(z \cdot y + x \cdot y\right) + x\]
x + y \cdot \left(z + x\right)
\left(z \cdot y + x \cdot y\right) + x
double f(double x, double y, double z) {
        double r6036751 = x;
        double r6036752 = y;
        double r6036753 = z;
        double r6036754 = r6036753 + r6036751;
        double r6036755 = r6036752 * r6036754;
        double r6036756 = r6036751 + r6036755;
        return r6036756;
}

double f(double x, double y, double z) {
        double r6036757 = z;
        double r6036758 = y;
        double r6036759 = r6036757 * r6036758;
        double r6036760 = x;
        double r6036761 = r6036760 * r6036758;
        double r6036762 = r6036759 + r6036761;
        double r6036763 = r6036762 + r6036760;
        return r6036763;
}

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.0

    \[x + y \cdot \left(z + x\right)\]
  2. Using strategy rm
  3. Applied distribute-lft-in0.0

    \[\leadsto x + \color{blue}{\left(y \cdot z + y \cdot x\right)}\]
  4. Final simplification0.0

    \[\leadsto \left(z \cdot y + x \cdot y\right) + x\]

Reproduce

herbie shell --seed 2019169 
(FPCore (x y z)
  :name "Main:bigenough2 from A"
  (+ x (* y (+ z x))))