Average Error: 0.0 → 0.0
Time: 8.3s
Precision: 64
\[x + y \cdot \left(z + x\right)\]
\[\left(x + z \cdot y\right) + x \cdot y\]
x + y \cdot \left(z + x\right)
\left(x + z \cdot y\right) + x \cdot y
double f(double x, double y, double z) {
        double r73996 = x;
        double r73997 = y;
        double r73998 = z;
        double r73999 = r73998 + r73996;
        double r74000 = r73997 * r73999;
        double r74001 = r73996 + r74000;
        return r74001;
}

double f(double x, double y, double z) {
        double r74002 = x;
        double r74003 = z;
        double r74004 = y;
        double r74005 = r74003 * r74004;
        double r74006 = r74002 + r74005;
        double r74007 = r74002 * r74004;
        double r74008 = r74006 + r74007;
        return r74008;
}

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

    \[\leadsto x + \color{blue}{\left(z \cdot y + x \cdot y\right)}\]
  4. Applied associate-+r+0.0

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

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

Reproduce

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