Average Error: 0.0 → 0.0
Time: 8.8s
Precision: 64
\[x + y \cdot \left(z + x\right)\]
\[\left(x + z \cdot y\right) + y \cdot x\]
x + y \cdot \left(z + x\right)
\left(x + z \cdot y\right) + y \cdot x
double f(double x, double y, double z) {
        double r86630 = x;
        double r86631 = y;
        double r86632 = z;
        double r86633 = r86632 + r86630;
        double r86634 = r86631 * r86633;
        double r86635 = r86630 + r86634;
        return r86635;
}

double f(double x, double y, double z) {
        double r86636 = x;
        double r86637 = z;
        double r86638 = y;
        double r86639 = r86637 * r86638;
        double r86640 = r86636 + r86639;
        double r86641 = r86638 * r86636;
        double r86642 = r86640 + r86641;
        return r86642;
}

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. Applied associate-+r+0.0

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

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

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

Reproduce

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