Average Error: 0.0 → 0.0
Time: 2.9s
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 r178280 = x;
        double r178281 = y;
        double r178282 = z;
        double r178283 = r178282 + r178280;
        double r178284 = r178281 * r178283;
        double r178285 = r178280 + r178284;
        return r178285;
}

double f(double x, double y, double z) {
        double r178286 = x;
        double r178287 = z;
        double r178288 = y;
        double r178289 = r178287 * r178288;
        double r178290 = r178286 + r178289;
        double r178291 = r178286 * r178288;
        double r178292 = r178290 + r178291;
        return r178292;
}

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