Average Error: 0.0 → 0.0
Time: 4.2s
Precision: 64
\[\left(x + y\right) \cdot \left(1 - z\right)\]
\[\left(x + y\right) \cdot 1 + \left(-z\right) \cdot \left(x + y\right)\]
\left(x + y\right) \cdot \left(1 - z\right)
\left(x + y\right) \cdot 1 + \left(-z\right) \cdot \left(x + y\right)
double f(double x, double y, double z) {
        double r26666 = x;
        double r26667 = y;
        double r26668 = r26666 + r26667;
        double r26669 = 1.0;
        double r26670 = z;
        double r26671 = r26669 - r26670;
        double r26672 = r26668 * r26671;
        return r26672;
}

double f(double x, double y, double z) {
        double r26673 = x;
        double r26674 = y;
        double r26675 = r26673 + r26674;
        double r26676 = 1.0;
        double r26677 = r26675 * r26676;
        double r26678 = z;
        double r26679 = -r26678;
        double r26680 = r26679 * r26675;
        double r26681 = r26677 + r26680;
        return r26681;
}

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 \left(x + y\right) \cdot 1 + \color{blue}{\left(-z\right) \cdot \left(x + y\right)}\]
  6. Final simplification0.0

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

Reproduce

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