Average Error: 0.0 → 0.0
Time: 6.2s
Precision: 64
\[\left(x + y\right) \cdot \left(z + 1\right)\]
\[\left(x \cdot z + y \cdot z\right) + \left(x + y\right) \cdot 1\]
\left(x + y\right) \cdot \left(z + 1\right)
\left(x \cdot z + y \cdot z\right) + \left(x + y\right) \cdot 1
double f(double x, double y, double z) {
        double r30479 = x;
        double r30480 = y;
        double r30481 = r30479 + r30480;
        double r30482 = z;
        double r30483 = 1.0;
        double r30484 = r30482 + r30483;
        double r30485 = r30481 * r30484;
        return r30485;
}

double f(double x, double y, double z) {
        double r30486 = x;
        double r30487 = z;
        double r30488 = r30486 * r30487;
        double r30489 = y;
        double r30490 = r30489 * r30487;
        double r30491 = r30488 + r30490;
        double r30492 = r30486 + r30489;
        double r30493 = 1.0;
        double r30494 = r30492 * r30493;
        double r30495 = r30491 + r30494;
        return r30495;
}

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

    \[\left(x + y\right) \cdot \left(z + 1\right)\]
  2. Using strategy rm
  3. Applied distribute-lft-in0.0

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

    \[\leadsto \color{blue}{z \cdot \left(x + y\right)} + \left(x + y\right) \cdot 1\]
  5. Using strategy rm
  6. Applied distribute-rgt-in0.0

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

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

Reproduce

herbie shell --seed 2019198 +o rules:numerics
(FPCore (x y z)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, G"
  (* (+ x y) (+ z 1.0)))