Average Error: 0.0 → 0.0
Time: 6.1s
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 r20419 = x;
        double r20420 = y;
        double r20421 = z;
        double r20422 = r20421 + r20419;
        double r20423 = r20420 * r20422;
        double r20424 = r20419 + r20423;
        return r20424;
}

double f(double x, double y, double z) {
        double r20425 = x;
        double r20426 = y;
        double r20427 = z;
        double r20428 = r20426 * r20427;
        double r20429 = r20425 * r20426;
        double r20430 = r20428 + r20429;
        double r20431 = r20425 + r20430;
        return r20431;
}

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))))