Average Error: 0.0 → 0.0
Time: 1.4s
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 r91878 = x;
        double r91879 = y;
        double r91880 = z;
        double r91881 = r91880 + r91878;
        double r91882 = r91879 * r91881;
        double r91883 = r91878 + r91882;
        return r91883;
}

double f(double x, double y, double z) {
        double r91884 = x;
        double r91885 = z;
        double r91886 = y;
        double r91887 = r91885 * r91886;
        double r91888 = r91884 + r91887;
        double r91889 = r91884 * r91886;
        double r91890 = r91888 + r91889;
        return r91890;
}

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