Average Error: 0.0 → 0.0
Time: 9.4s
Precision: 64
\[\left(x + y\right) \cdot \left(1 - z\right)\]
\[\left(x + y\right) \cdot \left(-z\right) + \left(x + y\right) \cdot 1\]
\left(x + y\right) \cdot \left(1 - z\right)
\left(x + y\right) \cdot \left(-z\right) + \left(x + y\right) \cdot 1
double f(double x, double y, double z) {
        double r2059358 = x;
        double r2059359 = y;
        double r2059360 = r2059358 + r2059359;
        double r2059361 = 1.0;
        double r2059362 = z;
        double r2059363 = r2059361 - r2059362;
        double r2059364 = r2059360 * r2059363;
        return r2059364;
}

double f(double x, double y, double z) {
        double r2059365 = x;
        double r2059366 = y;
        double r2059367 = r2059365 + r2059366;
        double r2059368 = z;
        double r2059369 = -r2059368;
        double r2059370 = r2059367 * r2059369;
        double r2059371 = 1.0;
        double r2059372 = r2059367 * r2059371;
        double r2059373 = r2059370 + r2059372;
        return r2059373;
}

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-rgt-in0.0

    \[\leadsto \color{blue}{1 \cdot \left(x + y\right) + \left(-z\right) \cdot \left(x + y\right)}\]
  5. Final simplification0.0

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

Reproduce

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