Average Error: 0.0 → 0.0
Time: 6.8s
Precision: 64
\[\left(x + y\right) \cdot \left(1.0 - z\right)\]
\[\left(-z\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot 1.0\]
\left(x + y\right) \cdot \left(1.0 - z\right)
\left(-z\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot 1.0
double f(double x, double y, double z) {
        double r928471 = x;
        double r928472 = y;
        double r928473 = r928471 + r928472;
        double r928474 = 1.0;
        double r928475 = z;
        double r928476 = r928474 - r928475;
        double r928477 = r928473 * r928476;
        return r928477;
}

double f(double x, double y, double z) {
        double r928478 = z;
        double r928479 = -r928478;
        double r928480 = y;
        double r928481 = x;
        double r928482 = r928480 + r928481;
        double r928483 = r928479 * r928482;
        double r928484 = 1.0;
        double r928485 = r928482 * r928484;
        double r928486 = r928483 + r928485;
        return r928486;
}

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.0 - z\right)\]
  2. Using strategy rm
  3. Applied sub-neg0.0

    \[\leadsto \left(x + y\right) \cdot \color{blue}{\left(1.0 + \left(-z\right)\right)}\]
  4. Applied distribute-lft-in0.0

    \[\leadsto \color{blue}{\left(x + y\right) \cdot 1.0 + \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.0\]

Reproduce

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