Average Error: 0.0 → 0.0
Time: 15.6s
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 r3541170 = x;
        double r3541171 = y;
        double r3541172 = r3541170 + r3541171;
        double r3541173 = 1.0;
        double r3541174 = z;
        double r3541175 = r3541173 - r3541174;
        double r3541176 = r3541172 * r3541175;
        return r3541176;
}

double f(double x, double y, double z) {
        double r3541177 = x;
        double r3541178 = y;
        double r3541179 = r3541177 + r3541178;
        double r3541180 = z;
        double r3541181 = -r3541180;
        double r3541182 = r3541179 * r3541181;
        double r3541183 = 1.0;
        double r3541184 = r3541179 * r3541183;
        double r3541185 = r3541182 + r3541184;
        return r3541185;
}

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