Average Error: 0.0 → 0.0
Time: 32.4s
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 r4499271 = x;
        double r4499272 = y;
        double r4499273 = r4499271 + r4499272;
        double r4499274 = 1.0;
        double r4499275 = z;
        double r4499276 = r4499274 - r4499275;
        double r4499277 = r4499273 * r4499276;
        return r4499277;
}

double f(double x, double y, double z) {
        double r4499278 = z;
        double r4499279 = -r4499278;
        double r4499280 = y;
        double r4499281 = x;
        double r4499282 = r4499280 + r4499281;
        double r4499283 = r4499279 * r4499282;
        double r4499284 = 1.0;
        double r4499285 = r4499282 * r4499284;
        double r4499286 = r4499283 + r4499285;
        return r4499286;
}

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