Average Error: 0.0 → 0.0
Time: 8.0s
Precision: 64
\[\left(x + y\right) \cdot \left(1.0 - z\right)\]
\[\left(x + y\right) \cdot \left(-z\right) + \left(x + y\right) \cdot 1.0\]
\left(x + y\right) \cdot \left(1.0 - z\right)
\left(x + y\right) \cdot \left(-z\right) + \left(x + y\right) \cdot 1.0
double f(double x, double y, double z) {
        double r2201159 = x;
        double r2201160 = y;
        double r2201161 = r2201159 + r2201160;
        double r2201162 = 1.0;
        double r2201163 = z;
        double r2201164 = r2201162 - r2201163;
        double r2201165 = r2201161 * r2201164;
        return r2201165;
}

double f(double x, double y, double z) {
        double r2201166 = x;
        double r2201167 = y;
        double r2201168 = r2201166 + r2201167;
        double r2201169 = z;
        double r2201170 = -r2201169;
        double r2201171 = r2201168 * r2201170;
        double r2201172 = 1.0;
        double r2201173 = r2201168 * r2201172;
        double r2201174 = r2201171 + r2201173;
        return r2201174;
}

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

    \[\leadsto \color{blue}{1.0 \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.0\]

Reproduce

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