Average Error: 0.0 → 0.0
Time: 1.9s
Precision: 64
\[\left(x + y\right) \cdot \left(1 - z\right)\]
\[\left(1 \cdot \left(x + y\right) - x \cdot z\right) + y \cdot \left(-z\right)\]
\left(x + y\right) \cdot \left(1 - z\right)
\left(1 \cdot \left(x + y\right) - x \cdot z\right) + y \cdot \left(-z\right)
double f(double x, double y, double z) {
        double r50418 = x;
        double r50419 = y;
        double r50420 = r50418 + r50419;
        double r50421 = 1.0;
        double r50422 = z;
        double r50423 = r50421 - r50422;
        double r50424 = r50420 * r50423;
        return r50424;
}

double f(double x, double y, double z) {
        double r50425 = 1.0;
        double r50426 = x;
        double r50427 = y;
        double r50428 = r50426 + r50427;
        double r50429 = r50425 * r50428;
        double r50430 = z;
        double r50431 = r50426 * r50430;
        double r50432 = r50429 - r50431;
        double r50433 = -r50430;
        double r50434 = r50427 * r50433;
        double r50435 = r50432 + r50434;
        return r50435;
}

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-rgt-in0.0

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

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

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

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

Reproduce

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