Average Error: 0.0 → 0.0
Time: 8.7s
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 r34406 = x;
        double r34407 = y;
        double r34408 = r34406 + r34407;
        double r34409 = 1.0;
        double r34410 = z;
        double r34411 = r34409 - r34410;
        double r34412 = r34408 * r34411;
        return r34412;
}

double f(double x, double y, double z) {
        double r34413 = x;
        double r34414 = y;
        double r34415 = r34413 + r34414;
        double r34416 = 1.0;
        double r34417 = z;
        double r34418 = r34416 - r34417;
        double r34419 = r34415 * r34418;
        return r34419;
}

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

Reproduce

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