Average Error: 0.0 → 0.0
Time: 15.2s
Precision: 64
\[\left(x + y\right) \cdot \left(1 - z\right)\]
\[\left(x + y\right) \cdot 1 + \left(x + y\right) \cdot \left(-z\right)\]
\left(x + y\right) \cdot \left(1 - z\right)
\left(x + y\right) \cdot 1 + \left(x + y\right) \cdot \left(-z\right)
double f(double x, double y, double z) {
        double r41920 = x;
        double r41921 = y;
        double r41922 = r41920 + r41921;
        double r41923 = 1.0;
        double r41924 = z;
        double r41925 = r41923 - r41924;
        double r41926 = r41922 * r41925;
        return r41926;
}

double f(double x, double y, double z) {
        double r41927 = x;
        double r41928 = y;
        double r41929 = r41927 + r41928;
        double r41930 = 1.0;
        double r41931 = r41929 * r41930;
        double r41932 = z;
        double r41933 = -r41932;
        double r41934 = r41929 * r41933;
        double r41935 = r41931 + r41934;
        return r41935;
}

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

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

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

Reproduce

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