Average Error: 0.0 → 0.0
Time: 13.7s
Precision: 64
\[\left(x + y\right) \cdot \left(1 - z\right)\]
\[1 \cdot \left(x + y\right) + \left(x + y\right) \cdot \left(-z\right)\]
\left(x + y\right) \cdot \left(1 - z\right)
1 \cdot \left(x + y\right) + \left(x + y\right) \cdot \left(-z\right)
double f(double x, double y, double z) {
        double r40267 = x;
        double r40268 = y;
        double r40269 = r40267 + r40268;
        double r40270 = 1.0;
        double r40271 = z;
        double r40272 = r40270 - r40271;
        double r40273 = r40269 * r40272;
        return r40273;
}

double f(double x, double y, double z) {
        double r40274 = 1.0;
        double r40275 = x;
        double r40276 = y;
        double r40277 = r40275 + r40276;
        double r40278 = r40274 * r40277;
        double r40279 = z;
        double r40280 = -r40279;
        double r40281 = r40277 * r40280;
        double r40282 = r40278 + r40281;
        return r40282;
}

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. Simplified0.0

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

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

Reproduce

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