Average Error: 0.0 → 0.0
Time: 8.4s
Precision: 64
\[\left(x + y\right) \cdot \left(1 - z\right)\]
\[\left(x + y\right) \cdot \left(1 - z\right)\]
\left(x + y\right) \cdot \left(1 - z\right)
\left(x + y\right) \cdot \left(1 - z\right)
double f(double x, double y, double z) {
        double r36018 = x;
        double r36019 = y;
        double r36020 = r36018 + r36019;
        double r36021 = 1.0;
        double r36022 = z;
        double r36023 = r36021 - r36022;
        double r36024 = r36020 * r36023;
        return r36024;
}

double f(double x, double y, double z) {
        double r36025 = x;
        double r36026 = y;
        double r36027 = r36025 + r36026;
        double r36028 = 1.0;
        double r36029 = z;
        double r36030 = r36028 - r36029;
        double r36031 = r36027 * r36030;
        return r36031;
}

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. Using strategy rm
  6. Applied distribute-lft-in0.0

    \[\leadsto 1 \cdot \left(x + y\right) + \color{blue}{\left(\left(-z\right) \cdot x + \left(-z\right) \cdot y\right)}\]
  7. Applied associate-+r+0.0

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

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

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

Reproduce

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