Average Error: 0.0 → 0.0
Time: 4.4s
Precision: 64
\[\left(x + y\right) \cdot \left(1 - z\right)\]
\[\left(x + y\right) \cdot 1 + \left(-z\right) \cdot \left(x + y\right)\]
\left(x + y\right) \cdot \left(1 - z\right)
\left(x + y\right) \cdot 1 + \left(-z\right) \cdot \left(x + y\right)
double f(double x, double y, double z) {
        double r35109 = x;
        double r35110 = y;
        double r35111 = r35109 + r35110;
        double r35112 = 1.0;
        double r35113 = z;
        double r35114 = r35112 - r35113;
        double r35115 = r35111 * r35114;
        return r35115;
}

double f(double x, double y, double z) {
        double r35116 = x;
        double r35117 = y;
        double r35118 = r35116 + r35117;
        double r35119 = 1.0;
        double r35120 = r35118 * r35119;
        double r35121 = z;
        double r35122 = -r35121;
        double r35123 = r35122 * r35118;
        double r35124 = r35120 + r35123;
        return r35124;
}

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

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

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

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

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

Reproduce

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