Average Error: 0.0 → 0.0
Time: 27.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 r4948351 = x;
        double r4948352 = y;
        double r4948353 = z;
        double r4948354 = r4948353 + r4948351;
        double r4948355 = r4948352 * r4948354;
        double r4948356 = r4948351 + r4948355;
        return r4948356;
}

double f(double x, double y, double z) {
        double r4948357 = y;
        double r4948358 = z;
        double r4948359 = r4948357 * r4948358;
        double r4948360 = x;
        double r4948361 = r4948360 * r4948357;
        double r4948362 = r4948359 + r4948361;
        double r4948363 = r4948362 + r4948360;
        return r4948363;
}

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