Average Error: 0.0 → 0.0
Time: 17.2s
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 r8584748 = x;
        double r8584749 = y;
        double r8584750 = z;
        double r8584751 = r8584750 + r8584748;
        double r8584752 = r8584749 * r8584751;
        double r8584753 = r8584748 + r8584752;
        return r8584753;
}

double f(double x, double y, double z) {
        double r8584754 = z;
        double r8584755 = y;
        double r8584756 = r8584754 * r8584755;
        double r8584757 = x;
        double r8584758 = r8584757 * r8584755;
        double r8584759 = r8584756 + r8584758;
        double r8584760 = r8584759 + r8584757;
        return r8584760;
}

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 2019162 
(FPCore (x y z)
  :name "Main:bigenough2 from A"
  (+ x (* y (+ z x))))