Average Error: 0.0 → 0.0
Time: 7.8s
Precision: 64
\[\left(x + y\right) \cdot \left(1 - z\right)\]
\[\left(x + y\right) \cdot 1 + \left(-\left(x \cdot z + z \cdot y\right)\right)\]
\left(x + y\right) \cdot \left(1 - z\right)
\left(x + y\right) \cdot 1 + \left(-\left(x \cdot z + z \cdot y\right)\right)
double f(double x, double y, double z) {
        double r32559 = x;
        double r32560 = y;
        double r32561 = r32559 + r32560;
        double r32562 = 1.0;
        double r32563 = z;
        double r32564 = r32562 - r32563;
        double r32565 = r32561 * r32564;
        return r32565;
}

double f(double x, double y, double z) {
        double r32566 = x;
        double r32567 = y;
        double r32568 = r32566 + r32567;
        double r32569 = 1.0;
        double r32570 = r32568 * r32569;
        double r32571 = z;
        double r32572 = r32566 * r32571;
        double r32573 = r32571 * r32567;
        double r32574 = r32572 + r32573;
        double r32575 = -r32574;
        double r32576 = r32570 + r32575;
        return r32576;
}

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. Using strategy rm
  7. Applied distribute-lft-in0.0

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

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

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

Reproduce

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