Average Error: 0.0 → 0.0
Time: 2.8s
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 r146281 = x;
        double r146282 = y;
        double r146283 = z;
        double r146284 = r146283 + r146281;
        double r146285 = r146282 * r146284;
        double r146286 = r146281 + r146285;
        return r146286;
}

double f(double x, double y, double z) {
        double r146287 = x;
        double r146288 = z;
        double r146289 = y;
        double r146290 = r146288 * r146289;
        double r146291 = r146287 + r146290;
        double r146292 = r146287 * r146289;
        double r146293 = r146291 + r146292;
        return r146293;
}

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