Average Error: 0.0 → 0.0
Time: 3.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 r35364 = x;
        double r35365 = y;
        double r35366 = r35364 + r35365;
        double r35367 = 1.0;
        double r35368 = z;
        double r35369 = r35367 - r35368;
        double r35370 = r35366 * r35369;
        return r35370;
}

double f(double x, double y, double z) {
        double r35371 = x;
        double r35372 = y;
        double r35373 = r35371 + r35372;
        double r35374 = 1.0;
        double r35375 = r35373 * r35374;
        double r35376 = z;
        double r35377 = -r35376;
        double r35378 = r35377 * r35373;
        double r35379 = r35375 + r35378;
        return r35379;
}

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 2020046 
(FPCore (x y z)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, H"
  :precision binary64
  (* (+ x y) (- 1 z)))