Average Error: 0.0 → 0.0
Time: 40.6s
Precision: 64
\[x + y \cdot \left(z + x\right)\]
\[x \cdot y + \left(y \cdot z + x\right)\]
x + y \cdot \left(z + x\right)
x \cdot y + \left(y \cdot z + x\right)
double f(double x, double y, double z) {
        double r5884407 = x;
        double r5884408 = y;
        double r5884409 = z;
        double r5884410 = r5884409 + r5884407;
        double r5884411 = r5884408 * r5884410;
        double r5884412 = r5884407 + r5884411;
        return r5884412;
}

double f(double x, double y, double z) {
        double r5884413 = x;
        double r5884414 = y;
        double r5884415 = r5884413 * r5884414;
        double r5884416 = z;
        double r5884417 = r5884414 * r5884416;
        double r5884418 = r5884417 + r5884413;
        double r5884419 = r5884415 + r5884418;
        return r5884419;
}

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 x \cdot y + \left(y \cdot z + x\right)\]

Reproduce

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