Average Error: 0.0 → 0.0
Time: 10.4s
Precision: 64
\[\left(x + y\right) \cdot \left(1 - z\right)\]
\[\left(-z\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot 1\]
\left(x + y\right) \cdot \left(1 - z\right)
\left(-z\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot 1
double f(double x, double y, double z) {
        double r696457 = x;
        double r696458 = y;
        double r696459 = r696457 + r696458;
        double r696460 = 1.0;
        double r696461 = z;
        double r696462 = r696460 - r696461;
        double r696463 = r696459 * r696462;
        return r696463;
}

double f(double x, double y, double z) {
        double r696464 = z;
        double r696465 = -r696464;
        double r696466 = y;
        double r696467 = x;
        double r696468 = r696466 + r696467;
        double r696469 = r696465 * r696468;
        double r696470 = 1.0;
        double r696471 = r696468 * r696470;
        double r696472 = r696469 + r696471;
        return r696472;
}

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

Reproduce

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