Average Error: 0.0 → 0.0
Time: 7.4s
Precision: 64
\[\left(x + y\right) \cdot \left(1 - z\right)\]
\[\left(-\left(x + y\right)\right) \cdot z + \left(x + y\right) \cdot 1\]
\left(x + y\right) \cdot \left(1 - z\right)
\left(-\left(x + y\right)\right) \cdot z + \left(x + y\right) \cdot 1
double f(double x, double y, double z) {
        double r43266 = x;
        double r43267 = y;
        double r43268 = r43266 + r43267;
        double r43269 = 1.0;
        double r43270 = z;
        double r43271 = r43269 - r43270;
        double r43272 = r43268 * r43271;
        return r43272;
}

double f(double x, double y, double z) {
        double r43273 = x;
        double r43274 = y;
        double r43275 = r43273 + r43274;
        double r43276 = -r43275;
        double r43277 = z;
        double r43278 = r43276 * r43277;
        double r43279 = 1.0;
        double r43280 = r43275 * r43279;
        double r43281 = r43278 + r43280;
        return r43281;
}

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 \color{blue}{1 \cdot \left(x + y\right)} + \left(x + y\right) \cdot \left(-z\right)\]
  6. Simplified0.0

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

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

Reproduce

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