Average Error: 0.0 → 0.0
Time: 14.7s
Precision: 64
\[\left(x + y\right) \cdot \left(1 - z\right)\]
\[1 \cdot \left(x + y\right) + \left(-z\right) \cdot \left(x + y\right)\]
\left(x + y\right) \cdot \left(1 - z\right)
1 \cdot \left(x + y\right) + \left(-z\right) \cdot \left(x + y\right)
double f(double x, double y, double z) {
        double r3372619 = x;
        double r3372620 = y;
        double r3372621 = r3372619 + r3372620;
        double r3372622 = 1.0;
        double r3372623 = z;
        double r3372624 = r3372622 - r3372623;
        double r3372625 = r3372621 * r3372624;
        return r3372625;
}

double f(double x, double y, double z) {
        double r3372626 = 1.0;
        double r3372627 = x;
        double r3372628 = y;
        double r3372629 = r3372627 + r3372628;
        double r3372630 = r3372626 * r3372629;
        double r3372631 = z;
        double r3372632 = -r3372631;
        double r3372633 = r3372632 * r3372629;
        double r3372634 = r3372630 + r3372633;
        return r3372634;
}

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 1 \cdot \left(x + y\right) + \left(-z\right) \cdot \left(x + y\right)\]

Reproduce

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