Average Error: 0.0 → 0.0
Time: 10.2s
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 r40633 = x;
        double r40634 = y;
        double r40635 = r40633 + r40634;
        double r40636 = 1.0;
        double r40637 = z;
        double r40638 = r40636 - r40637;
        double r40639 = r40635 * r40638;
        return r40639;
}

double f(double x, double y, double z) {
        double r40640 = x;
        double r40641 = y;
        double r40642 = r40640 + r40641;
        double r40643 = -r40642;
        double r40644 = z;
        double r40645 = r40643 * r40644;
        double r40646 = 1.0;
        double r40647 = r40642 * r40646;
        double r40648 = r40645 + r40647;
        return r40648;
}

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)))