Average Error: 0.0 → 0.0
Time: 5.9s
Precision: 64
\[\left(x + y\right) \cdot \left(1.0 - z\right)\]
\[\left(-z\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot 1.0\]
\left(x + y\right) \cdot \left(1.0 - z\right)
\left(-z\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot 1.0
double f(double x, double y, double z) {
        double r1181621 = x;
        double r1181622 = y;
        double r1181623 = r1181621 + r1181622;
        double r1181624 = 1.0;
        double r1181625 = z;
        double r1181626 = r1181624 - r1181625;
        double r1181627 = r1181623 * r1181626;
        return r1181627;
}

double f(double x, double y, double z) {
        double r1181628 = z;
        double r1181629 = -r1181628;
        double r1181630 = y;
        double r1181631 = x;
        double r1181632 = r1181630 + r1181631;
        double r1181633 = r1181629 * r1181632;
        double r1181634 = 1.0;
        double r1181635 = r1181632 * r1181634;
        double r1181636 = r1181633 + r1181635;
        return r1181636;
}

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(1.0 - z\right)\]
  2. Using strategy rm
  3. Applied sub-neg0.0

    \[\leadsto \left(x + y\right) \cdot \color{blue}{\left(1.0 + \left(-z\right)\right)}\]
  4. Applied distribute-lft-in0.0

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

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

Reproduce

herbie shell --seed 2019156 
(FPCore (x y z)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, H"
  (* (+ x y) (- 1.0 z)))