Average Error: 0.0 → 0.0
Time: 10.8s
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 r41849 = x;
        double r41850 = y;
        double r41851 = r41849 + r41850;
        double r41852 = 1.0;
        double r41853 = z;
        double r41854 = r41852 - r41853;
        double r41855 = r41851 * r41854;
        return r41855;
}

double f(double x, double y, double z) {
        double r41856 = x;
        double r41857 = y;
        double r41858 = r41856 + r41857;
        double r41859 = 1.0;
        double r41860 = r41858 * r41859;
        double r41861 = z;
        double r41862 = -r41861;
        double r41863 = r41862 * r41858;
        double r41864 = r41860 + r41863;
        return r41864;
}

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