Average Error: 0.0 → 0.0
Time: 6.4s
Precision: 64
\[x + y \cdot \left(z + x\right)\]
\[\left(x + z \cdot y\right) + y \cdot x\]
x + y \cdot \left(z + x\right)
\left(x + z \cdot y\right) + y \cdot x
double f(double x, double y, double z) {
        double r109298 = x;
        double r109299 = y;
        double r109300 = z;
        double r109301 = r109300 + r109298;
        double r109302 = r109299 * r109301;
        double r109303 = r109298 + r109302;
        return r109303;
}

double f(double x, double y, double z) {
        double r109304 = x;
        double r109305 = z;
        double r109306 = y;
        double r109307 = r109305 * r109306;
        double r109308 = r109304 + r109307;
        double r109309 = r109306 * r109304;
        double r109310 = r109308 + r109309;
        return r109310;
}

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-lft-in0.0

    \[\leadsto x + \color{blue}{\left(y \cdot z + y \cdot x\right)}\]
  4. Applied associate-+r+0.0

    \[\leadsto \color{blue}{\left(x + y \cdot z\right) + y \cdot x}\]
  5. Simplified0.0

    \[\leadsto \color{blue}{\left(x + z \cdot y\right)} + y \cdot x\]
  6. Final simplification0.0

    \[\leadsto \left(x + z \cdot y\right) + y \cdot x\]

Reproduce

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