Average Error: 0.0 → 0.0
Time: 10.5s
Precision: 64
\[\left(x + y\right) \cdot \left(1 - z\right)\]
\[\left(-z\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot 1\]
\left(x + y\right) \cdot \left(1 - z\right)
\left(-z\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot 1
double f(double x, double y, double z) {
        double r1728165 = x;
        double r1728166 = y;
        double r1728167 = r1728165 + r1728166;
        double r1728168 = 1.0;
        double r1728169 = z;
        double r1728170 = r1728168 - r1728169;
        double r1728171 = r1728167 * r1728170;
        return r1728171;
}

double f(double x, double y, double z) {
        double r1728172 = z;
        double r1728173 = -r1728172;
        double r1728174 = y;
        double r1728175 = x;
        double r1728176 = r1728174 + r1728175;
        double r1728177 = r1728173 * r1728176;
        double r1728178 = 1.0;
        double r1728179 = r1728176 * r1728178;
        double r1728180 = r1728177 + r1728179;
        return r1728180;
}

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. Final simplification0.0

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

Reproduce

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