Average Error: 0.0 → 0.0
Time: 29.4s
Precision: 64
\[\left(x + y\right) \cdot \left(1 - z\right)\]
\[1 \cdot \left(x + y\right) + \left(-\left(x \cdot z + y \cdot z\right)\right)\]
\left(x + y\right) \cdot \left(1 - z\right)
1 \cdot \left(x + y\right) + \left(-\left(x \cdot z + y \cdot z\right)\right)
double f(double x, double y, double z) {
        double r50628 = x;
        double r50629 = y;
        double r50630 = r50628 + r50629;
        double r50631 = 1.0;
        double r50632 = z;
        double r50633 = r50631 - r50632;
        double r50634 = r50630 * r50633;
        return r50634;
}

double f(double x, double y, double z) {
        double r50635 = 1.0;
        double r50636 = x;
        double r50637 = y;
        double r50638 = r50636 + r50637;
        double r50639 = r50635 * r50638;
        double r50640 = z;
        double r50641 = r50636 * r50640;
        double r50642 = r50637 * r50640;
        double r50643 = r50641 + r50642;
        double r50644 = -r50643;
        double r50645 = r50639 + r50644;
        return r50645;
}

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(-z\right) \cdot \left(x + y\right)}\]
  7. Using strategy rm
  8. Applied distribute-lft-in0.0

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

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

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

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

Reproduce

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