Average Error: 0.0 → 0.0
Time: 11.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 r120587 = x;
        double r120588 = y;
        double r120589 = z;
        double r120590 = r120589 + r120587;
        double r120591 = r120588 * r120590;
        double r120592 = r120587 + r120591;
        return r120592;
}

double f(double x, double y, double z) {
        double r120593 = x;
        double r120594 = z;
        double r120595 = y;
        double r120596 = r120594 * r120595;
        double r120597 = r120593 + r120596;
        double r120598 = r120593 * r120595;
        double r120599 = r120597 + r120598;
        return r120599;
}

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