Average Error: 0.0 → 0.0
Time: 10.7s
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 r40625 = x;
        double r40626 = y;
        double r40627 = r40625 + r40626;
        double r40628 = 1.0;
        double r40629 = z;
        double r40630 = r40628 - r40629;
        double r40631 = r40627 * r40630;
        return r40631;
}

double f(double x, double y, double z) {
        double r40632 = x;
        double r40633 = y;
        double r40634 = r40632 + r40633;
        double r40635 = -r40634;
        double r40636 = z;
        double r40637 = r40635 * r40636;
        double r40638 = 1.0;
        double r40639 = r40634 * r40638;
        double r40640 = r40637 + r40639;
        return r40640;
}

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