Average Error: 0.0 → 0.0
Time: 6.0s
Precision: 64
\[x + y \cdot \left(z + x\right)\]
\[\left(y \cdot z + x \cdot y\right) + x\]
x + y \cdot \left(z + x\right)
\left(y \cdot z + x \cdot y\right) + x
double f(double x, double y, double z) {
        double r7782666 = x;
        double r7782667 = y;
        double r7782668 = z;
        double r7782669 = r7782668 + r7782666;
        double r7782670 = r7782667 * r7782669;
        double r7782671 = r7782666 + r7782670;
        return r7782671;
}

double f(double x, double y, double z) {
        double r7782672 = y;
        double r7782673 = z;
        double r7782674 = r7782672 * r7782673;
        double r7782675 = x;
        double r7782676 = r7782675 * r7782672;
        double r7782677 = r7782674 + r7782676;
        double r7782678 = r7782677 + r7782675;
        return r7782678;
}

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. Final simplification0.0

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

Reproduce

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