Average Error: 0.0 → 0.0
Time: 9.0s
Precision: 64
\[\left(x + y\right) \cdot \left(1 - z\right)\]
\[\left(1 \cdot \left(x + y\right) - x \cdot z\right) + \left(-z\right) \cdot y\]
\left(x + y\right) \cdot \left(1 - z\right)
\left(1 \cdot \left(x + y\right) - x \cdot z\right) + \left(-z\right) \cdot y
double f(double x, double y, double z) {
        double r19033 = x;
        double r19034 = y;
        double r19035 = r19033 + r19034;
        double r19036 = 1.0;
        double r19037 = z;
        double r19038 = r19036 - r19037;
        double r19039 = r19035 * r19038;
        return r19039;
}

double f(double x, double y, double z) {
        double r19040 = 1.0;
        double r19041 = x;
        double r19042 = y;
        double r19043 = r19041 + r19042;
        double r19044 = r19040 * r19043;
        double r19045 = z;
        double r19046 = r19041 * r19045;
        double r19047 = r19044 - r19046;
        double r19048 = -r19045;
        double r19049 = r19048 * r19042;
        double r19050 = r19047 + r19049;
        return r19050;
}

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

    \[\leadsto 1 \cdot \left(x + y\right) + \color{blue}{\left(-z\right) \cdot \left(x + y\right)}\]
  7. Using strategy rm
  8. 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)}\]
  9. 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}\]
  10. Simplified0.0

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

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

Reproduce

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