Average Error: 0.0 → 0.0
Time: 11.6s
Precision: 64
\[x + y \cdot \left(z + x\right)\]
\[x + \left(y \cdot z + x \cdot y\right)\]
x + y \cdot \left(z + x\right)
x + \left(y \cdot z + x \cdot y\right)
double f(double x, double y, double z) {
        double r136051 = x;
        double r136052 = y;
        double r136053 = z;
        double r136054 = r136053 + r136051;
        double r136055 = r136052 * r136054;
        double r136056 = r136051 + r136055;
        return r136056;
}

double f(double x, double y, double z) {
        double r136057 = x;
        double r136058 = y;
        double r136059 = z;
        double r136060 = r136058 * r136059;
        double r136061 = r136057 * r136058;
        double r136062 = r136060 + r136061;
        double r136063 = r136057 + r136062;
        return r136063;
}

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. Simplified0.0

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

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

Reproduce

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