Average Error: 0.0 → 0.0
Time: 1.6s
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 r94159 = x;
        double r94160 = y;
        double r94161 = z;
        double r94162 = r94161 + r94159;
        double r94163 = r94160 * r94162;
        double r94164 = r94159 + r94163;
        return r94164;
}

double f(double x, double y, double z) {
        double r94165 = x;
        double r94166 = z;
        double r94167 = y;
        double r94168 = r94166 * r94167;
        double r94169 = r94165 + r94168;
        double r94170 = r94165 * r94167;
        double r94171 = r94169 + r94170;
        return r94171;
}

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